simple objects in OpenGL...
...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
you just put toghether a bunch of triangles or quads. it''s usually easier to import a file format than to hard code it.
JoeMont001@aol.com www.polarisoft.n3.net
JoeMont001@aol.com www.polarisoft.n3.net
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
a2k
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
jay
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.
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.
if you want to use equations just make them parametric and then step the variable, making points along the way and connecting them
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement