PDA

View Full Version : Rendering an object in more than one place



King Fuzzy
08-24-2001, 01:56 PM
How do I Render an object in more than one place and rotated to different angles,

niko
08-24-2001, 03:42 PM
Lets assume that we start from origin (0, 0, 0)...

glPushMatrix();
glTranslate(somewhere);
glRotate(angle1);
drawObject();
glPopMatrix(); // back to origin

glPushMatrix();
glTranslate(somewhere else);
glRotate(angle2);
drawObject();
glPopMatrix(); // again, back to origin

...and so forth.

- Niko

King Fuzzy
08-25-2001, 09:47 AM
Originally posted by niko:
Lets assume that we start from origin (0, 0, 0)...
...and so forth.

- Niko

Thankyou