View Full Version : Creating solid primitives
10-08-2004, 11:39 PM
How can I create solid primitives in OpenGL with userdefined features? For example I want draw a
cube with rounded edges. My idea is:
First I draw the outlines and the planes and then I will changed this in a solid primitive. Is there there any possibility to do this in OpenGL?
Thanks for your answers?
10-12-2004, 05:21 AM
Nope, you will need to create mesh for the primitive, if it's just a box with rounded corners you could always use glu do get that, but if you want a more generic method to create solid primitives you need to create a mesh yourself for them.
OpenCascade (www.opencascade.org/com) for example can create complex primitives that can be modified with different operations to round corners, cut holes, create dents and things like that, but that might be some overkill (12000 header files and a 150MB download...)
You could also have a peek at the nurbs support in glu, this can be used to create many primitives.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.