glrotatef explanation - YanLiang1102/Computer_Graphics_OU GitHub Wiki
The first argument is the angle of the rotation (in degrees)
- The others arguments are NOT the point you are rotating around. You always rotate around origine (0.0 , 0.0, 0.0). If you want to rotate around another point, you should use a translation with it.
- The others arguments are a vector that show how the angle is apply. The rotation is in a perpendicular plan to the vector. And when you look at the vector from the end to the begining, the angle is counter clock wise.
So like Ru5tyNZ said :
gl.glRotatef(xrot,1.0f,0.0f,0.0f); is a rotation around the X axis gl.glRotatef(yrot,0.0f,1.0f,0.0f);is a rotation around the Y axis gl.glRotatef(zrot,0.0f,0.0f,1.0f); is a rotation around the Z axis