I have a problem with this openGL code:
glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glPushMatrix(); // put current matrix on stack //glTranslatef(0.0f, 0.
Simply do the rotation after the translation. The order matters.
glTranslatef(xpos, ypos, zpos); glRotatef(rotationAngle, 0.0f, 1.0f, 0.0f);