PDA

View Full Version : Undo transformations



CGagnon
04-09-2008, 07:01 PM
Hi,

I have a small application that draws 3D axes at origin.

I can do a lot of translation and rotation of the drawing.

Is it possible to reset the view to the origin like undo of all translation and rotation ?

My goal is to be able to get a view front or side or down...

Thanks,

Claude

-NiCo-
04-09-2008, 11:53 PM
glLoadIdentity() ?

Zengar
04-09-2008, 11:55 PM
You set the transformations via the matrices, so it may be a good idea to get basic understanding of them. Loading the identity matrix via the glIdentity command will "reset" the transformation matrix. Also, look into glPushMatrix/glPopMatrix commands.