Archived

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

Functor

Resetting glTranslate???

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
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