Original Post
This code creates a cube that can rotate around the world origin, by tranlating the cube X units away then rotating it. The problem is that it rotates around it's own object coordinates.. How can I prevent this second rotation from occuring?
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glLoadIdentity();
// Viewing transformation
gluLookAt(0.0f, 0.0f, -5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f);
glRotatef(YSpeed, 0.0f, 1.0f, 0.0f);
glTranslatef(1.0f, 0.0f, 0.0f);
glCallList(Cube);
glutSwapBuffers();
[edited by - foniks munkee on May 27, 2003 5:44:49 AM]