tags:

views:

137

answers:

2

hey, i am using opengl and i was wondering if there was an inbuilt function in opengl to draw a torus? Thanks i advance

+1  A: 

I think you're looking for glutSolidTorus.

3lectrologos
that was exactly what i was looking for
yuneek
+1  A: 

3lectrologos is right that a torus is available in Glut.

But if you only need the torus, you can just grab the code from here (from line 687).

freeglut is a completely OpenSourced alternative to the OpenGL Utility Toolkit (GLUT) library.

epatel
thanks you for the help sir, let me try it.
yuneek