View Full Version : faulty matrix stack?

05-17-2001, 01:39 PM
how come this function always returns me the value -1.07374e+008 for all 16 array entries?

GLfloat matrix[16];
glGetFloatv(GL_MODELVIEW_MATRIX, matrix);

ive tried it in various locations in my program, but the result always stays the same. ive read on a few sites (and the advanced discussion board) that this works, so why does it fail on me?

05-18-2001, 04:08 AM
Have you initialized the state of the modelview matrix, with a glLoadIdentity, or glLoadMatrix command?

If not, then it looks like you're just getting an uninitialized stack.

If you do a glLoadIdentity, just before the get, see what your values are then.