skaslev / gl3w

Simple OpenGL core profile loading
http://github.com/skaslev/gl3w
The Unlicense
705 stars 157 forks source link

Import headers, libraries and frameworks from OS X, Fink and MacPorts on Darwin only #6

Closed sgielen closed 12 years ago

sgielen commented 12 years ago

I've added some lines to SConstruct so that the project builds right away on OS X when Freeglut is installed on Fink or MacPorts, two oft-used third-party package managers on OS X. Also, I added the CoreFoundation Framework as a dependency as it is required for linking on OS X.

skaslev commented 12 years ago

Thanks for the feedback.

Currently OS X is not officially supported by gl3w. The reason is that Apple's most recent stock drivers don't have OpenGL 3+ support.

Btw, what drivers are you using to get OpenGL 3 support on OS X?

Also, I'm not sure that using X11 glut is the right thing to do on OS X. I would prefer to support the glut framework that the system ships with (-framework GLUT).

Ludophonic commented 12 years ago

OS X Lion supports OpenGL 3.2 as does the upcoming OS X Mountain Lion.

gl3w is not needed however, as gl3.h and gl3ext,h headers and associated link libraries are included within the OpenGL framework on OS X.

skaslev commented 12 years ago

I don't think so. I'm with OS X 10.7.4 on my Air and OpenGL version reports "2.1 APPLE-7.18.18" although it has 22/23 of 3.0 in extensions.

Which is also what Apple states on their site https://developer.apple.com/graphicsimaging/opengl/capabilities/

If gl3.h and gl3ext.h works for you that's great. Most people use gl3w on windows or when they care for having their code across platforms.

Ludophonic commented 12 years ago

You have to specifically ask for the core profile. They don't support the compatibility profile.

It's actually on the webpage you linked, Click 'core' on the left above the table. https://developer.apple.com/graphicsimaging/opengl/capabilities/GLInfo_1073_Core.html

skaslev commented 12 years ago

My bad, that sounds awesome. Thanks for sharing. I'll try to get it working with gl3w when I get some free time.

Oh, and as always, patches are welcome =-)