Rotation problem

Started by
2 comments, last by mbanghart 15 years, 9 months ago
Hi, I am trying to rotate an arrow that I create with a display list. Here is the display list: //direction arrow glNewList(8, GL_COMPILE); glBegin(GL_LINE_STRIP); glVertex2f(7, 2); glVertex2f(7, 4); glVertex2f(6.7, 3.8); glVertex2f(7, 4); glVertex2f(7.3, 3.8); glEnd(); glEndList(); Here is my code to rotate it: glPushAttrib(GL_ALL_ATTRIB_BITS); glPushMatrix(); glRotatef(arrowAngle,0,0,1); glCallList(8); glPopAttrib(); glPopMatrix(); This is a Ortho projection. THe arrow rotates correctly, but is also translated to a new position. Not sure why it is doing this. Thanks
Advertisement
The original arrow is off-center.
So I have to define it from the center? Rotate it and then translate it to where I want?
Thanks. It's fixed.

This topic is closed to new replies.

Advertisement