Rotation problem
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement