View Full Version : matrix made by glrotate

03-16-2009, 01:49 AM
is there any way by which i can extract the matrix made by glrotate or gltranslate or any other transformation?

03-16-2009, 03:48 AM

why do you want that matrix?

just in case any of these do:

- You can get the current active modelview matrix by calling glGetFloatv(GL_MODELVIEW_MATRIX, mat);
(for more information, http://linux.die.net/man/3/glgetfloatv)

- For how to generate those matrixes and others you can just google around and get something like this: http://gpwiki.org/index.php/3D:Matrix_Math

Dark Photon
06-04-2009, 06:36 AM
See this (http://www.opengl.org/wiki/Viewing_and_Transformations#How_do_I_get_the_activ e_MODELVIEW_or_PROJECTION_matrices.3F) and this (http://www.opengl.org/sdk/docs/man/xhtml/glGet.xml)