How do you draw Objects? (Spheres, Cones, etc)

Ok whats the fastest way to draw spheres or cones in Opengl? I know you can use a model but what if i wanted to just draw it like DrawCone or something. Is there something like that in Opengl? And how fast would it be?

If you’re using Glut, glutSolidSphere for spheres. Not sure if there is a glutSolidCone or not, though. My crappy work system appears to be about to crash and won’t open much right now so I can’t check the glut headers for it.

There’s gluSphere() and gluCylinder(). The latter will generate a cone if its top face is set to a radius of 0.0

[This message has been edited by ipo (edited 11-15-2000).]

But when you set the upper radius to 0, will it really generate a clean cone? Or will it make many vertices in 1 point? I think a cone is best made out of 2 triangle fans.

Originally posted by Michael Steinberg:
But when you set the upper radius to 0, will it really generate a clean cone? Or will it make many vertices in 1 point? I think a cone is best made out of 2 triangle fans.

Yes, it’s not really the most efficient cone. Triangle strips or fans would work much better but the original poster wanted a fast way to draw it. The performance isn’t that bad unless you have thousands of them in the scene.

liB

Oh, my english.
I thought he would need FAST routines for that stuff… Well, it can only get better.