]> gitweb.factorcode.org Git - factor.git/commitdiff
Move do-matrix to fix bootstrap
authorDoug Coleman <erg@trifocus.net>
Tue, 25 Oct 2005 21:06:15 +0000 (21:06 +0000)
committerDoug Coleman <erg@trifocus.net>
Tue, 25 Oct 2005 21:06:15 +0000 (21:06 +0000)
library/opengl/opengl-utils.factor

index 7c0a3ee3b7e9bd02842be5dc2f514c5cee8ad8e7..5004185ddd0da48bba5ab6defb43509c39eca4d9 100644 (file)
@@ -44,6 +44,9 @@ USING: alien errors kernel math namespaces opengl sdl sequences ;
 : do-state ( what quot -- )
     swap glBegin call glEnd ; inline
 
+: do-matrix ( mode quot -- )
+    swap glMatrixMode glPushMatrix call glPopMatrix ; inline
+
 : gl-color ( { r g b } -- )
     dup first 255 /f over second 255 /f rot third 255 /f
     glColor3d ;
@@ -85,9 +88,6 @@ USING: alien errors kernel math namespaces opengl sdl sequences ;
     #! Draw a polygon.
     GL_LINE_LOOP (gl-poly) ;
 
-: do-matrix ( mode quot -- )
-    swap glMatrixMode glPushMatrix call glPopMatrix ; inline
-
 : gl-set-clip ( loc dim -- )
     dup first2 ( 1+ ) >r >r
     over second swap second + height get swap - >r