PDA

View Full Version : drawing 3D object



04-15-2004, 10:34 AM
what is the best way to draw 3D objects like
cylinder or pyramid
and how can i do so ?

Honk
04-15-2004, 12:03 PM
Your question is a bit vague. You mean draw arbitary 3d objects with OpenGL?

You could define the verticies by hand or formula and feed them to OpenGL using the immediate mode, a displaylist or a VBO. You could also generate the mesh using a 3d editor and write/use a loader that uses one of the above methods to use the object inside OpenGL.

I recommend VBO's but for a beginner I would recommend a learning curve going from the immediate mode over displaylists to VBO's.

I propably missed something but I am sure someone else will remind me of that.

nexusone
04-15-2004, 03:58 PM
Depends on what you are trying to do.

For simple object, you can use premade ones from the glu and glut library's.


Originally posted by <uk78>:
what is the best way to draw 3D objects like
cylinder or pyramid
and how can i do so ?