PDA

View Full Version : GlUT objects in OpenGL 4.3



sam_thedancer
04-20-2013, 09:57 AM
Greetings:
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.
Sam

Dark Photon
04-20-2013, 12:15 PM
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.

sam_thedancer
04-20-2013, 01: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)?

nightmareci
04-20-2013, 03: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.

sam_thedancer
04-21-2013, 12:00 AM
Thanks, nightmareci.