Jump to content
  • Advertisement
Sign in to follow this  

Rotation problem

This topic is 3800 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!