Skip to main content
gamedev.net
🔒 Locked

simple objects in OpenGL...

Started by Taal A. Chaykin 4 replies 500+ views
Original Post
Taal A. Chaykin
Taal A. Chaykin
...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
Julio
Julio
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
My HomepageSome shoot to kill, others shoot to mame. I say clear the chamber and let the lord decide. - Reno 911
a2k
a2k
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
------------------General Equation, this is Private Function reporting for duty, sir!a2k
jspeers
jspeers
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
Taal A. Chaykin
Taal A. Chaykin
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.
OGAPO
OGAPO
if you want to use equations just make them parametric and then step the variable, making points along the way and connecting them
Brought to you by: [email=ogapo@ithink.net]O.G.A.P.O.[/email] +----------------------------------------+| Surgeon General's Warning - || OGAPO can cause serious mental damage || if taken in large doses. |+----------------------------------------+/* Never underestimate the power of stupid people in large groups */

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.