View Full Version : rotation

11-03-2003, 06:54 AM
I am having major problems with rotations.

I have my object and can now transform it (Thanks for the help). I am now struggling with rotatating it.

I want to perform the rotation on the object and then transform it to another part of the screen. So far all I am getting is the rest of my scene rotating and the item I want to move staying still.

Any help as always is much appreciated


11-03-2003, 08:38 AM
If you read through this forum, this topic is been answer 1000's of times.

You can use glPushMatrix / glPopMatrix to save and load the matrix.

Using these commands you can choose what objects are effected by what rotations and translations.


glPushMatrix(); // Save Matrix
glPopMatrix(); // Load back Matrix to past state.

Now the next thing you draw will not be effect by the translation or rotation done between the Push/Pop Matrix.

So for each object you draw that you do not want their matrix operations to effect objects after,use Push/Pop.