Hello.
I’ve have a question about switching beetwen projection modes. The problem is that when I want to jump to the ortho mode and then draw something nothing happens. I have no idea why is that so because I’ve copied these lines just straight from a tutorial - look :
glMatrixMode(GL_MODELVIEW); // Draw matrix state unknown
// We have not use glLoadIdentity for Modelview so matrix in state of last call to draw world
/* blah blah blah goes here */
glMatrixMode(GL_PROJECTION); // Back to Projection matrix
glPopMatrix(); // Restore projection matrix from last Push command
glMatrixMode(GL_MODELVIEW); // Back to the perspective
// Modelview state unknown???
Is there anything wrong? I don’t think I’ve screwd up drawing of primitives…
I don’t think it is primitive problem, more a initializing the diffrent matrix modes.
Also not enought code to see if there are any other problems. post more of the display routine code.
[This message has been edited by nexusone (edited 04-03-2003).]
[This message has been edited by nexusone (edited 04-03-2003).]
maybe you don’t need the glLoadIdentity() after the glMatrixMode(GL_MODELVIEW), but usually, the ‘camera’ is different from perspective views and orthographic views. That could screw up things too.
[This message has been edited by oliii (edited 04-03-2003).]
Haha! Ok guys, thanks for your help but reply of Bob (first post) already solved my problem. It was just a tiny bug. I used GL_PROJECTION_MATRIX insted of GL_PROJECTION. That’s all. Everthing works just fine.