glGetFloatv??

I’m trying to use glGetFloatv to get the modelview matrix. For some WIERD reason, it doesn’t work. Is there some way to get around this? Can I somehow get at the gobal that stores the modelview matrix?

i´ve had the same problem, it seems as if it matters WHERE you put the glGetFloat in your code (perhaps in a separate function)… unfortunately, i don´t know where to put the command to make it work safely, i just tried a few locations until i found a working configuration and did not change anything about it (never touch a running system
maybe i (and you) am producing a GLerror in your code that causes this strange behaviour - i know that i do so, but haven´t located it yet, neither am i sure that it is the reason for this bug

Can you be more specific on WHAT doesn’t work about it? Do you get back nothing? Do you get exception errors?

hoshi55,
I don’t know of any restrictions on where you place the call except for the following.

  1. It has to be done AFTER the window has been created and the pixelformat setup to use OpenGL.
  2. It can’t be used between glBegin/glEnd.

usually if getFloatfv does not work, you get an array of very small negative numbers.

yes, i know there are NO rstrictions about where to put that command, but if you produce a GLerror in your code somewhere, this sometimes causes unpredictable results. i cleaned up my own code now, removing GLerrors and the glGetFloat call seems to work now no matter where i put it. This might be different across various openGL-implementaions (again) but it´s the case with 3dfx drivers.