I am a little stuck right now. Can someone tell me how to rotate properly an object using glRotate function? Specifically I want to make a ball move, the code I am using right now is:
GL11.glTranslatef(0.0f, 0.0f, -1.0f);
GL11.glRotatef(xAngle, 1.0f, 0.0f, 0.0f);
GL11.glRotatef(zAngle, 0.0f, 0.0f, 1.0f);
What I don't get is how can I rotate around the initial x and z axes. As soon as I rotate around x, the whole system of course is rotated and the new around the new z axis is not what I want.
I suggest you look at some of the tutorials here: http://nehe.gamedev.net/ They're designed to help people learn the basics of OpenGL programming and I know a lot of people (including me) have used them to get started. ;D
I had done most of these once. I understand how rotation works generally, it's just this problem that troubles me. Thnx anyway :)
I found out that this problem can be solved using a custom transformation matrix, or quaternions. I am familiar with neither, so If anyone has any useful links, please let me know.
Cheers.