From: Kartik Thakore Date: Sun, 2 Aug 2009 14:32:37 +0000 (-0400) Subject: Added raster subs X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4fb8d9603fa00607c52749c0b37fc8abdef25d7d;p=sdlgit%2FSDL_perl.git Added raster subs --- diff --git a/src/OpenGL.xs b/src/OpenGL.xs index 331967e..def391c 100644 --- a/src/OpenGL.xs +++ b/src/OpenGL.xs @@ -1231,16 +1231,24 @@ glCallListsString ( string ) glCallLists(len,GL_BYTE,str); void -glRasterPos ( x, y, z, ... ) +glRasterPos ( x, y, ... ) double x double y - double z CODE: - if ( items == 4 ) { - double w = SvNV(ST(3)); - glRasterPos4d(x,y,z,w); - } else { - glRasterPos3d(x,y,z); + if (items == 2) + { + glRasterPos2d (x,y); + } + else if (items == 3) + { + double z = SvNV (ST(2)); + glRasterPos3d (x,y,z); + } + else if (items == 4) + { + double z = SvNV (ST(2)); + double w = SvNV (ST(3)); + glRasterPos4d (x,y,z,w); } void