I am here because I hve a problem to understand the glRotate and glTranlate function of opengl.
I have following problem:
There is an object in the world space. The object will be translatet by glTranslate. After the translation I am rotating the object with glRotate around the world coordinate space.
glRotate( angle, 0.0, 1.0, 0.0 );
glTranslate( posx, posy, posz );
In the next programm loop, if I am translating the object, it will move along the local axis and not along the world axis.
What I am doing wrong??? I mean evry loop my modelview matrix will be cleared by using glLoadIdentity(). Then I am moving the object along the world axis and rotate the object.
Here is an Image which shows my problem I get the result 2 but I want do get result 3.
Best regards and thanks alot for the help.