PDA

View Full Version : GLUT and OpenGL 3.2



Ragnemalm
01-12-2012, 12:36 AM
As far as I can tell, GLUT has not been updated to support OpenGL 3.2, right? FreeGLUT has calls for specifying OpenGL version, but I can't find anything similar in GLUT.

I can write Cocoa-based OpenGL programs with 3.2, and there are competitors like GLFW, but GLUT is a terrific API that I really want to keep using for my teaching. Should I switch to FreeGLUT?

Zyx_2000
01-12-2012, 03:50 AM
Yes, switch to freeGLUT, unless you want to use GLFW. Nobody should use GLUT these days.

Ragnemalm
01-12-2012, 07:06 AM
Then it would be nice if Apple could get their act together and simply update to FreeGLUT.

arekkusu
01-12-2012, 12:49 PM
Nothing's stopping you from building FreeGLUT and linking against it. Just like adding any open source library to your app.


The problem with updating GLUT to 3.2 isn't 3.2 per se, it's Core Profile. All of that glutSolidTeapot etc API relies on deprecated API that doesnt exist in Core Profile.

Ragnemalm
01-13-2012, 01:24 AM
No, nothing stops me from fixing it myself in all sorts of ways (including taking the GLUT code and just update it myself), but GLUT comes with the OS, is official sample code and all. So I think Apple should just update it to make it current. They are so fast at deprecating everything else. But maybe that is the problem, they are good at replacing but not at maintaining.

geeksweep
01-15-2012, 11:12 PM
isn't using NSOpenGLView supposed to take care of all the glut stuff? Looking at the diagram on the apple developer website it seems that it should be able to handle all of the keyboard and mouse events.

Ragnemalm
01-16-2012, 03:10 AM
isn't using NSOpenGLView supposed to take care of all the glut stuff? Looking at the diagram on the apple developer website it seems that it should be able to handle all of the keyboard and mouse events.
Oh, of course it does, in a non-portable way. But that is the problem. It won't help me make code that will run in our Linux lab.

thokra
01-23-2012, 03:43 AM
Still, why aren't you setting up a FreeGLUT build like arukkuse suggested?

Ragnemalm
01-23-2012, 07:10 AM
Still, why aren't you setting up a FreeGLUT build like arukkuse suggested?
Because I can't waste time on installing libraries that doesn't clearly support 3.2 (possibly ending up with an old version), and I needed to get going immediately. You can only afford failing that many times, then you just go any kind of "safe" way. But yes, FreeGLUT should be the right solution and I will use it as soon as I have the time. But it always takes time.

thokra
01-23-2012, 08:05 AM
If your only using the window management facilities (include context/core context creation) then using FreeGLUT and GLEW is completely sufficient. Do you need any of the fixed-function using FreeGLUT convenience functions?