Archived

This topic is now archived and is closed to further replies.

Taal A. Chaykin

simple objects in OpenGL...

Recommended Posts

...how would I create some simple objects using OpenGL calls (with glBegin, glEnd...) like spheres, cones, cylinders, ''doug-nutz'' etc. without using the gluSphere, glu* commands? thanks in advance

Share this post


Link to post
Share on other sites
glut is the only "interface" you can use that will produce primitives without using the gl utilities. you should use the primitives for testing, and eventually learn the gluquadrics.

a2k

Share this post


Link to post
Share on other sites
Does anyone have any code examples of importing a file format? I know NeHe had links off his site to import asc files and md2 files on the cd-rom, but does anyone have any working code examples so that I can see how this is done?

jay

Share this post


Link to post
Share on other sites
hmm... I can do loading from the file thing, what I need to figure out is drawing with ''parametrics'', like a cylinder would be defined as:
x = rcos(angle)
y = rsin(angle) from 0 to 2pi
z = height from 0 to 1
I know about quadrics, but I basically have to hard-code, gluSphere, gluCylinder, etc.

Share this post


Link to post
Share on other sites
if you want to use equations just make them parametric and then step the variable, making points along the way and connecting them

Share this post


Link to post
Share on other sites