View Full Version : GlUT objects in OpenGL 4.3

04-20-2013, 08:57 AM
What I see with 4.3 is that objects should be encapsulated in VAOs with the vertex position/color etc. data buffered. So how does something like glutWireTorus() (where we don't "see" the vertices) fit into this, or maybe it won't and we need to code up even basic objects?

Thank you in advance for your insights.

Dark Photon
04-20-2013, 11:15 AM
What you're referring to is 4.3 core profile. In 4.3 compatibility profile, there's no such restriction. Compat profile is the default.

I'd fully expect that GLUT would not work with core, so just use compat.

04-20-2013, 12:27 PM
Thanks, Dark Photon.
But I am curious about 4.3 core. Does one have to code up spheres, toruses, etc. by hand? Or is there some other library which might help (e.g., glm for math)?

04-20-2013, 02:42 PM
The OpenGL SuperBible (http://www.starstonesoftware.com/OpenGL/) has a helper library that can create various 3D shapes for you, but it's difficult to separate out the library so you can use it in your own projects. Otherwise, you do have to code up your own shapes by hand, or write a shape generator function/class that takes as parameters the size/vertex resolution of the object to be generated.

04-20-2013, 11:00 PM
Thanks, nightmareci.