Problem with GL_MODELVIEW_MATRIX

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

When you call glGetDoublev, do you have an active rendering context ? do glGetDoublev() return an error code (glGetError) ?

Mikael

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