Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm using SDL2 and GLEW on OSX Mountain Lion (2012 Macbook Air) to create an OpenGL context. Querying for the GLSL version, it reports GLSL version 1.2. I'm curious if this is a limitation of the HD4000 driver, the Macbook Air/OSX, or perhaps a limitation of SDL/GLEW?

share|improve this question
Anyone who stumbles on this question and is specifically wondering about using SDL 2.0 to create an OpenGL 3.2 context, check out this related Stack Overflow question: Here. For now, the simple answer is: the current SDL release does not support this. BUT, you can modify the SDL 2.0 source to "hack" that functionality in. Hopefully this will be properly supported in an upcoming SDL 2.0 release. –  Captain Head Aug 20 '12 at 20:32
add comment

1 Answer

up vote 3 down vote accepted

According to this, the hardware supports OpenGL 4.0, but the Mac drivers/OSX only support 3.2. That should still get you GLSL 1.50 (you might not be able to get 1.30 or 1.40), but you need to use the core profile, as OSX doesn't support the compatibility profile. I think SDL defaults to the compatibility mode, so you probably need to explicitly request core profile context.

share|improve this answer
I saw OSX support for 3.2 as well, that's what had me baffled. But, now looking at the OpenGL context version, SDL is creating an OpenGL 2.1 context. Currently I'm looking into whether SDL2 actually has the ability to create the 3.2 context in OSX... –  Captain Head Aug 14 '12 at 20:57
@Tapio: OS X 10.7+ does support OpenGL 3.2. Here is how you do it. –  Kyle Aug 14 '12 at 23:53
@Tapio What is core profile and compatibility profile? Why GLSL 1.5 can be supported when 1.3 or 1.4 can't be? –  iamcreasy Apr 23 '13 at 0:59
@iamcreasy: Core profile does not have deprecated stuff such as the fixed function pipeline. If an implementation does not support a particular version of OpenGL, it is not required to support the associated GLSL version either. Most vendors have added support for OpenGL versions chronologically, but Apple skipped OpenGL 3.0 and 3.1 and ditched compatibility profile in doing so (implementing compatibility would have basically meant implementing also the versions below). –  Tapio Apr 23 '13 at 6:59
@iamcreasy: Find out what graphics card your desired generation has and refer to the link or this matrix. Basically, if it's not very old, it will run 3.2core on a recent OSX. –  Tapio Apr 24 '13 at 7:00
show 2 more comments

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.