Getting back the transformation matrix

How can I get OpenGL to read the current transformation matrix into some int m[][] so that it’s individual rows and columns are available to me?

Plz email me as well as posting a response.

Thanks, Jordan

You can use:

GLdouble ProjectionMatrix[16],ModelViewMatrix[16];

glGetDoublev(GL_PROJECTION_MATRIX,ProjectionMatrix);
glGetDoublev(GL_MODELVIEW_MATRIX,ModelViewMatrix);

Then, the indices 0-15 corresponds to the following in the matrix:

[0 4 8 12]
[1 5 9 13]
[2 6 10 14]
[3 7 11 15]

Regards.

Eric

THANK YOU!!!

You just saved me about 40 points on my midterm :wink: