Jump to content
  • Advertisement


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


question on modelview and popmatrix needed

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

when you change to modelview mode it lets you modify the world right putting it on a stack. GlTranslatef movies the world and just the object. So if I wanted to just move one object when I do glLoadIdentity then glTranslatef am I moving the world or just that object how would I move one object and not the other I get this problem where the 2nd object is always right inside the camera. Can anyone clarify or explain?

Share this post

Link to post
Share on other sites
ok the first thing u have to do is LoadIdentity()
now set up a camera using gluLookAt()
now draw objects
if u want to render one obj at some position v(x, y, z)
do this:
glTranslatef(x, y ,z);
/* renderobj*/

and do this as many times u want


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!