I have problem in glGetDoublev(GL_MODELVIEW_MATRIX, modelview), here I am not able to get model matrix, when i debug, i get the garbage values for all the 16 values in the MODEL MATRIX…
Are your matrices pointers to floats? If they are doubles, then I would think you are getting garbage into the matrices before you try and retrieve them, possibly with a glLoadMatrix or glMultMatrix.
I have used the same code in different MFC Appln where it’s working fine only when I maximum the window (if the window is restored back, i am not able to get the same value of the mouse pointer in a 3D space), but it’s not working in my present MFC appln, is this anything to do with setting up or intializing the viewport!!!