I am trying to rotate a cube 90 degrees on the Y axis, and then 90 degrees on the Z axis, but when I apply the rotation on the Z axis, it actually changes the angle only on the X axis.
This is my code:
glRotatef(90.0, 0.0, 1.0, 0.0);
glRotatef(90.0, 0.0, 0.0, 1.0);
What is the correct way to achieve the result I want - I.e. 90 degrees on Y and then 90 degrees on Z?
Is there a good tutorial that explains how to use glRotate()
correctly with examples?
do it once but set which angle you want to rotate within one function