PDA

View Full Version : OpenGL primitives



Whisky Bob
03-19-2003, 09:01 AM
What OpenGL primitives are there?
I know how use textured triangles and quads
in 3D with OpenGL,
but are ther any more type of primitves?
I mean stuff like voxels, beizer lines,
circles etc. ?

Orzech
03-19-2003, 10:50 AM
Primitives : triangles, quads, points, lines. You can also build them as fans or strips. I'm not sure abour bezier curves...

nexusone
03-19-2003, 11:47 AM
There is not a openGL function, but there are ton's of examples on how to do beizer lines and surfaces in openGL.



Originally posted by Whisky Bob:
What OpenGL primitives are there?
I know how use textured triangles and quads
in 3D with OpenGL,
but are ther any more type of primitves?
I mean stuff like voxels, beizer lines,
circles etc. ?

Halcyon
03-19-2003, 05:05 PM
I think beizer curves are not considered OpenGL primitives.

- Halcyon

Edit: While I'm at it, voxels are definetely not OpenGL primitives. To my knowledge, there is hardware support for voxels and OpenGL and DirectX do not natively support it. You have to implement those yourself.


[This message has been edited by Halcyon (edited 03-19-2003).]

Deiussum
03-21-2003, 06:22 AM
Bezier's aren't primitives, but there ARE functions in OpenGL for doing these. Look at the glMap*, and glEval* functions. I think these are the ones you can use. I did an example of how to do this once, but I'm not sure where I put it offhand.

Edit: Just remembered one of the apps I have on my website uses the bezier functions. It uses them to generate a funnel cloud of points. I use some extra translations in order to make it bigger at the top, but if I remember right, I had a command-line parameter to show the actual bezier curve. You can find it here (http://www.lycanth.com/OpenGL/Demos/Tornado.zip) .

[This message has been edited by Deiussum (edited 03-21-2003).]