is there a reason why glLoadIdentity() doesn't work for me?

hi all!

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.

any suggestions?

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.

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 :slight_smile:

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.

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.