Basic OpenGL problem (glGet)

Status
Not open for further replies.

iKibbles

Wise, Aged Ars Veteran
139
This is the kind of problem I know I'll figure out if I get some rest, but right now it's really frustrating me.

I'm trying to use glGet to acquire some state information, but it doesn't seem to be acting as defined. The following is a simplified example of what I'm trying to do:

code:<HR>
Code:
GLint i = 0;
glMatrixMode(GL_MODELVIEW);
glGetIntegerv(GL_MATRIX_MODE, &i);
cout << "mode: " << i << " " << GL_MODELVIEW << " " << endl;

And the output I get is: "mode: 0 5888"

From the man pages, it looks like glGet is supposed to replace the second parameter with the value of the first parameter. Anyone want to tell me what I'm doing wrong?
 

Catfish

Ars Tribunus Angusticlavius
9,954
Hmmm.....should work.
Check to see if glMatrixMode is generating an error - possibly it's not setting the matrix mode, or you haven't got an OpenGL context available...
Or maybe the matrix mode isn't set until it's next used with a call to glBegin (although that would be odd).


I'd wander over to www.flipcode.com - someone on the boards there should know something.
 
Status
Not open for further replies.