draw torus

Hi,

I’m trying to draw 3 times one torus, each with 90 degrees upon the other.
So, I maked a list to draw a torus and called the list 3 times with between the
calls a rotation of 90 degrees.
On the screen, I just see one torus, the torus around the Z axis. What do I have
to do to draw the torus around the X and Y axis to?

Thanks,
liyanbe

Hi,

I think you need to call glRotatef before you call your function to draw the torus.
If you need to translate use gltranslatef.

I think you need to post some code. What might be happening is that you are drawing the three torus on top of eachother and glrotate is not producing any effect. Check at what stage you call glrotate.

[This message has been edited by billy (edited 03-27-2001).]

Do something like this

glPushMatrix();
glRotatef(90.0, 1.0, 0.0, 0.0);
glutSolidTorus(); // or whatever you’re using
glPopMatrix();
glPushMatrix();
glRotatef(90.0, 0.0, 1.0, 0.0);
glutSolidTorus();
glPopMatrix();
glPushMatrix();
glRotatef(90.0, 0.0, 0.0, 1.0);
glutSolidTorus();
glPopMatrix();

(EDIT note: Just realized I forgot to change the axis for the other two rotates. Copy/paste can be evil sometimes. )

[This message has been edited by Deiussum (edited 03-27-2001).]