PDA

View Full Version : How to abstract matrix



UnIcron
02-19-2003, 04:46 PM
Basically what i wanna do is to get the current matrix on the stack.
Is there any method that returns the matrix?
what does glPopMatrix() return?

shinpaughp
02-19-2003, 09:33 PM
Use glGetFloatv(GLenum pname, GLfloat *params) where pname is either GL_MODELVIEW_MATRIX or GL_PROJECTION_MATRIX and params is a pointer to a 4x4 matrix of GLfloat or equivalent size of equivalent type where you want matrix to be stored.