rotation

I want to rotate an object in my scene but on rotation the whole scene is rotating. How can i make just the object rotate, and the rest of the screen remain stationary?

I am using keyboard input to controll the rotation.

Thanks

As you know all matrix operations effect every object after they are used, so you have to use glPush/PopMatrix to save the matrix state before a translate or rotate you do not want to effect other object drawn after.

// Start Object
glPushMatrix(); // Save current matrix to stack
glRotate(…);
draw_object();
glPopMatrix(); //Load saved matrix from stack

Originally posted by Saxo:
[b]I want to rotate an object in my scene but on rotation the whole scene is rotating. How can i make just the object rotate, and the rest of the screen remain stationary?

I am using keyboard input to controll the rotation.

Thanks[/b]