Archived

This topic is now archived and is closed to further replies.

glGetFloatv(GL_MODELVIEW_MATRIX, m) dont work!

This topic is 5148 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

glGetFloatv(GL_MODELVIEW_MATRIX, m) doesn''t seem to work with my setup, it always returns the same value (a saw someone else having the same problem on a newsgroup post). I know it can''t be right, because if i call LoadMatrix straight after, on the result that I get from the above statement, i get a completly inconsistant result. I have a Radeon 9500 PRO, although not the latest drivers (and i cant update on this comp) Help would be much appreciated!

Share this post


Link to post
Share on other sites
if i just do

glGetFloatv(GL_MODELVIEW_MATRIX, m1);
glTranslatef(3.0, 4.0, 5.0);
glGetFloatv(GL_MODELVIEW_MATRIX, m2);

then m1 and m2 would still be the same

even when i glFlush and glFinish before and after the calls

[edited by - FearedPixel on November 9, 2003 5:47:13 PM]

Share this post


Link to post
Share on other sites
Are you sure the matrix mode is set to model-view when those calls are made?


"Sneftel is correct, if rather vulgar." --Flarelocke

Share this post


Link to post
Share on other sites
Maybe it''s wglMakeCurrent(), or other initialization ?
Maybe it''s because your matrix stack is full? (forgot to pop?)

Do you get any visible result/change when rendering?

Share this post


Link to post
Share on other sites
All the rendering etc works fine, the transformations are doing their job.

I am using C# + CsGL, so i declare m1 and m2 like float[] m1 = new float[16];

My matrix stack isn''t full (i would get error).

Share this post


Link to post
Share on other sites
Not an empty array, its just got some random values, possibly a valid matrix.

Ive solved it now by managing my own matrix stack, of course its pretty pointless having the same information in two places.

Share this post


Link to post
Share on other sites