PDA

View Full Version : Problem with GL_MODELVIEW_MATRIX



Aquileo
02-12-2004, 02:21 AM
Hello

I've a problem with GL_MODELVIEW_MATRIX and GL_PROJECTION_MATRIX because when I do:

glGetDoublev(GL_MODELVIEW_MATRIX, mvmatrix);
glGetDoublev(GL_PROJECTION_MATRIX, prmatrix);

I use mvmatrix and prmatrix for pass to gluUnProject, but their values are {0,...,0} and gluUnProject give me a mistake value.

I try to solve with glLoadIdentity, glMatrixMode and the problem continue.

Anybody knows why?

Thanks.
Josemi

mikael_aronsson
02-12-2004, 03:28 AM
When you call glGetDoublev, do you have an active rendering context ? do glGetDoublev() return an error code (glGetError) ?

Mikael

Aquileo
02-12-2004, 03:37 AM
I think yes.

I work with OpenGLPanel and I see the object perfectly.

And when I make a second point, then I've a correct value for mvmatrix and prjmatrix but I need the first point too.

Thanks for reply me.
Josemi