Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Functor

Resetting glTranslate???

This topic is 5967 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

Hey! I''ve constructed a room using a stationary coordinate system. It seemed to make sense to use a stationary coordinate system for the walls and stuff. Now I have to add a 10 tables and 45 chairs to the room. I have functions for these that create them at the origin. I wasnt to use glTranslate and glRotate to move throughout the room placing tables and chairs where ever I please. My problem is that after a couple translations, I lose track of where I am, and I cant get to where I want to get. So, what I want to do is reset the translation after I place each object, so I can use the initial stationary coordinate system as a map. How do I do this? please Help! Thanks FUNCTOR

Share this post


Link to post
Share on other sites
Advertisement
Actually, I tried glLoadIdentity() already, and it made all my objects after it disappear.

Thanks! The Stack operations work quite nicely! I knew there had to be a way rather than just reversong every translation and rotation after a new object is drawn.

[edited by - functor on March 21, 2002 1:29:17 PM]

Share this post


Link to post
Share on other sites
glLoadIdentity() resets your coordinatsystem.
So it''s logic that you''re objects dissapear because your transform matrix is reseted..

After you''ve used glLoadIdentity() you can do your translations out of the orign again.

Or did I misunderstood you?

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!