Archived

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

question on modelview and popmatrix needed

This topic is 5380 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:
glPushMatrix();
glTranslatef(x, y ,z);
/* renderobj*/
glPopMatrix();

and do this as many times u want



/*ilici*/

Share this post


Link to post
Share on other sites