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?

  • \$\begingroup\$ 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. \$\endgroup\$ Aug 20, 2012 at 20:32

1 Answer 1


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.

  • \$\begingroup\$ 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... \$\endgroup\$ Aug 14, 2012 at 20:57
  • \$\begingroup\$ @Tapio: OS X 10.7+ does support OpenGL 3.2. Here is how you do it. \$\endgroup\$
    – Kyle
    Aug 14, 2012 at 23:53
  • \$\begingroup\$ @Tapio What is core profile and compatibility profile? Why GLSL 1.5 can be supported when 1.3 or 1.4 can't be? \$\endgroup\$ Apr 23, 2013 at 0:59
  • 1
    \$\begingroup\$ @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). \$\endgroup\$
    – Tapio
    Apr 23, 2013 at 6:59
  • 1
    \$\begingroup\$ @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. \$\endgroup\$
    – Tapio
    Apr 24, 2013 at 7:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .