I can’t get this to work, what is wrong with my matrix?
Im using this for shadowMapping.
I want these to be identical
gl_Position = gl_ProjectionMatrix * gl_ModelViewMatrix * gl_Vertex;
and
gl_Position = gl_ProjectionMatrix * V * gl_Vertex;
The model view matrix consists of whatever you set when the glMatrixMode is set to GL_MODELVIEW. (ie all the glRotate, glTranslate etc calls)
It usually consists of the tranformation from model space into camera space (hence modelview) How this is setup is app specific so I doubt anyone can help you. (This is not even really that advanced)
If you just want the value in a sepeate matrix, just call