View Full Version : Read Matrix values
08-13-2000, 02:08 PM
Sorry if this should have been posted in the advanced forum, anyway heres my question. How do I read the values in an OpenGL matrix. I know how to use glLoadMatrix to use one of my own, I need to be able to save it after proformimg rotation, translation, etc http://www.opengl.org/discussion_boards/ubb/confused.gif
To read the values from a matrix in OpenGL, you can do like this.
GLfloat mvmatrix; //modelview matrix is 16 elements long
GLfloat prmatrix; //... as is the projec tion matrix
// now, get the matrices
Modelview is stored in mvmatrix, and projection is stored in prmatrix.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.