Original Post
i've been trying (w/out success) to solve the following problem in the last two days. can some1 help me? i have a sphere that can be moved (using the arrows) on the x or z axis. i want the sphere also to have a suitable inner rotation while it's moving, and i'm using to glRotatef to do it. the problem is that when i first rotate the ball around the z axis (glrotatef(zrot,0,0,1) where zrot>0) - it changes the sphere axises, and therefore the rotation around the x axis that i do afterwards, don't work correctly (glrotatef(xrot,0,0,1)). in other words: the effect of the glrotatef around the x axis, will be different if i rotated or not the sphere around the z axis before. is there any way to solve it? maybe i need to use to rotatef function differently? or maybe i need to use some kind of matrix multiplication or something? thanks in advance!