Getting the MODELVIEW matrix...
Posted
by james.ingham
on Stack Overflow
See other posts from Stack Overflow
or by james.ingham
Published on 2010-03-31T00:31:48Z
Indexed on
2010/03/31
0:33 UTC
Read the original article
Hit count: 571
Hi,
I've been pulling my hair out trying to get some matrix calculations working properly and started to wonder. If I have the following:
glPushMatrix();
float m[16];
glGetFloatv(GL_MODELVIEW_MATRIX, m);
glPopMatrix();
What should I expect the values of m
to equal?
Currently I'm getting these values and I'm confused as to where they're coming from:
-1, 0, 0, 0,
0, -0.6139, 0.7893522, 0,
0, 0.789352238, 0.61394, 0,
0, 0.0955992, -1.344529, 1,
I'm assuming there is something which affects this, but I'm not sure what. Could anyone help? I've tried changing pretty much anything but everytime I push the matrix stack I always get this matrix straight away!
I don't think this makes a difference but I'm using OpenGLES.
Thanks
© Stack Overflow or respective owner