Jump to content
  • Advertisement
Sign in to follow this  
mbanghart

Translate back to origin

This topic is 3632 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, Is there a way to translate back to the origin (0,0,0) directly? Or, do I need to know how much I have translated "away" from the origin and translate the opposite of that? Thanks

Share this post


Link to post
Share on other sites
Advertisement

glLoadIdentity();
Draw();

or

for(all objects)
{
glPushMatrix();
glTranslatef(...)
glRotatef(...)
Draw();
glPopMatrix();
}

or

for(all objects)
{
glLoadMatrixf(...);
Draw();
}

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!