View Full Version : draw torus
03-26-2001, 11:56 PM
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?
03-27-2001, 02:41 AM
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).]
03-27-2001, 06:55 AM
Do something like this
glRotatef(90.0, 1.0, 0.0, 0.0);
glutSolidTorus(); // or whatever you're using
glRotatef(90.0, 0.0, 1.0, 0.0);
glRotatef(90.0, 0.0, 0.0, 1.0);
(EDIT note: Just realized I forgot to change the axis for the other two rotates. Copy/paste can be evil sometimes. ) http://www.opengl.org/discussion_boards/ubb/smile.gif
[This message has been edited by Deiussum (edited 03-27-2001).]
Powered by vBulletin® Version 4.2.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.