: 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 ;
#! 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