getting and setting gl_modelview

Started by
2 comments, last by jpetrie 17 years, 6 months ago
hi, can i set GL_MODELVIEW matrix from an array, and also get it into an array? how? best wishes
Advertisement
Use glLoadMatrix and glMultMatrix to load and multiply a user matrix form an array. To get the matrix, use glGetFloatv or glGetDoublev with GL_MODELVIEW_MATRIX.
use glLoadMatrix*/glMultMatrix* to set it
and to get it use glGet*

EDIT : 9sec ;_;
Set the current stack to the model view stack, then use glLoadMatrix or glLoadMatrixf to set the model view matrix. Use glGetDoublev or glGetFloatv with GL_MODELVIEW_MATRIX as the enum value to obtain the matrix.

This topic is closed to new replies.

Advertisement