PDA

View Full Version : Rotate an object indipendently from previous rotations



12-14-2003, 05:01 AM
How can we rotate an object indipendently from previous rotations? I.e. how can we rotate a sphere? I tried:

glRotatef(anglex,1.0f,0.0f,0.0f);
glRotatef(angley,0.0f,1.0f,0.0f);

but It didn't work.

Leyder Dylan
12-14-2003, 12:38 PM
I don't know what you exactly wxant to do but if you try :

glPushMatrix();
glRotate(x)
your sphere
glPopMatrix();
glRotate(y)
your sphere