• Advertisement

Archived

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

Different Rotations, Scalations, etc....

This topic is 5884 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, Till now I''ve got all my knowledge from samples :-) I made a sample, with 3 Objects. I drew the Objects static on their places, without translation and scalation, etc.. Then I wanted to make 2 cylinders with the openGL Procedure for Cylinders and disks, etc. They should be on two different places. I tried to bring them on those two different places with glLoadIdentity(); and then the translation, scalation, etc. But it doesn''t work. I get some crazy..... So my question: How do i transform and rotate two different Objects, without rotating the others with the object?!

Share this post


Link to post
Share on other sites
Advertisement
You call PushMatrix() before transforming your first object, then PopMatrix() after you''re done. And do the same with each object.

What that does is save a copy of the current transformation onto the matrix stack, let you do your local transform, then restore it to what it was.

Share this post


Link to post
Share on other sites

  • Advertisement