PDA

View Full Version : getting the matrix



raijinken
06-02-2004, 07:50 AM
Hi. I need to store the model matrix in an array or any other structure. I've read about using glGetFloatv() with GL_MODELVIEW_MATRIX as argument but i don't know exactly how does it work.

Could anyone write a small example using this function to store the matrix?

Thanks in advance.

06-02-2004, 08:01 AM
typedef float TMatrix[4][4];

TMatrix mv;
glGetFloatv(GL_MODELVIEW_MATRIX,&mv[0][0]);

raijinken
06-02-2004, 11:36 PM
Thanks mikeman