2 USING: kernel alien.c-types namespaces sequences opengl.gl ;
6 : get-modelview-matrix ( -- alien )
7 GL_MODELVIEW_MATRIX 16 "GLdouble" <c-array> tuck glGetDoublev ;
9 SYMBOL: modelview-matrix-stack
11 : init-modelview-matrix-stack ( -- ) V{ } clone modelview-matrix-stack set ;
13 : push-modelview-matrix ( -- )
14 get-modelview-matrix modelview-matrix-stack get push ;
16 : pop-modelview-matrix ( -- ) modelview-matrix-stack get pop glLoadMatrixd ;