View Full Version : is there a reason why glLoadIdentity() doesn't work for me?
i'm having a problem w/glLoadIdentity...
i use it to clear the projection matrix, then set the PM. then i use it after setting opengl to modelview...
any time thereafter, if i call it, my geometry doesn't show up...
i wish i had code in front of me, but i'm on someone else's computer.
My suggestion is that you post the code when you have it. A very vauge description of the porblem.
Your call to glLoadIdentity() is probably working fine (how could it not?) -- rather, it's likely that you're just aiming the camera off in the wrong direction or somesuch.
12-05-2001, 02:25 AM
You use it to clear the projection matrix ?
If it's true, you are wrong, use glPopMatrix instead. (did you feed up the modelview stack ? It could be a problem to show things...)
If you mean to clear to top matrix, forget my post :-)
12-06-2001, 12:50 PM
I'm w/ jmg. You're probably aiming in the wrong direction (or your objects aren't where you think they are.) Happens to me all the time.
12-06-2001, 09:08 PM
glPopMatrix is not necessary for simply setting up a projection matrix. In fact, I wouldn't suggest glPushing/Poping off of the GL_PROJECTION matrix stack unless it is actually necessary to save the current projection matrix.
But, the sequence of code for re-setting the projection matrix is as follows:
/*Insert your favorite perspective function. For example, gluPerspective(parameters);*/
And there you are.
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.