# OpenGL 3.2 in OSX 10.7

**URL:** <https://community.khronos.org/t/opengl-3-2-in-osx-10-7/63676>\
**Category:** OpenGL\
**Tags:** macos\
**Created:** [February 24, 2011, 8:08am UTC](https://community.khronos.org/t/opengl-3-2-in-osx-10-7/63676 "2011-02-24T08:08:55Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![malexander](https://community.khronos.org/user_avatar/community.khronos.org/malexander/32/150_2.png) [@malexander](https://community.khronos.org/u/malexander)\
**Post date:** [February 24, 2011, 8:08am UTC](https://community.khronos.org/t/opengl-3-2-in-osx-10-7/63676/1 "2011-02-24T08:08:55Z")

</div>

According to [macrumors](http://www.macrumors.com/2011/02/24/apple-releases-first-developer-preview-of-mac-os-x-lion/), OSX 10.7 will have OpenGL 3.2 support, due out sometime this summer. Fingers crossed for a stable, well performing implementation.

---

<div class="post-metadata">

**Author:** ![imported\_Groovounet](https://community.khronos.org/user_avatar/community.khronos.org/imported_groovounet/32/75_2.png) [@imported\_Groovounet](https://community.khronos.org/u/imported_Groovounet)\
**Post date:** [February 24, 2011, 8:25am UTC](https://community.khronos.org/t/opengl-3-2-in-osx-10-7/63676/2 "2011-02-24T08:25:58Z")

</div>

WHouhouuuuu! 🙂

---

<div class="post-metadata">

**Author:** ![Alfonse\_Reinheart](https://community.khronos.org/user_avatar/community.khronos.org/alfonse_reinheart/32/4357_2.png) [@Alfonse\_Reinheart](https://community.khronos.org/u/Alfonse_Reinheart)\
**Post date:** [February 24, 2011, 10:24pm UTC](https://community.khronos.org/t/opengl-3-2-in-osx-10-7/63676/3 "2011-02-24T22:24:47Z")

</div>

It’s odd that they would pick 3.2 instead of 3.3, when all 3.2 capable hardware can also support 3.3.

What’s going to be interesting is what extensions they also support in addition to 3.2. The differences between 3.2 and 3.3 are many; explicit\_attrib\_locations alone is a pretty big deal for how you write shaders.

---

<div class="post-metadata">

**Author:** ![imported\_Groovounet](https://community.khronos.org/user_avatar/community.khronos.org/imported_groovounet/32/75_2.png) [@imported\_Groovounet](https://community.khronos.org/u/imported_Groovounet)\
**Post date:** [February 25, 2011, 4:31am UTC](https://community.khronos.org/t/opengl-3-2-in-osx-10-7/63676/4 "2011-02-25T04:31:26Z")

</div>

Apple is writing there own drivers and I guess that’s they will have time to finalize until Lion release. I don’t think it’s a choice.

If they had choice, it would be OpenGL 4.1

---

<div class="post-metadata">

**Author:** ![bugmenot](https://community.khronos.org/user_avatar/community.khronos.org/bugmenot/32/4251_2.png) [@bugmenot](https://community.khronos.org/u/bugmenot)\
**Post date:** [February 26, 2011, 7:21am UTC](https://community.khronos.org/t/opengl-3-2-in-osx-10-7/63676/5 "2011-02-26T07:21:57Z")

</div>

Not sure where macrumors is getting its information from but actual user reports don’t corroborate their story.

Lion OpenGL Support using NVIDIA 9400M 256MB:  
[https://skitch.com/fredericl/rt7mh/opengl-extensions-viewer](https://skitch.com/fredericl/rt7mh/opengl-extensions-viewer)

Lion OpenGL Support using NVIDIA 320M:  
[http://dl.dropbox.com/u/7755/glview-NVIDIA%20GeForce%20320M%20OpenGL%20Engine.xml](http://dl.dropbox.com/u/7755/glview-NVIDIA%20GeForce%20320M%20OpenGL%20Engine.xml)

Lion OpenGL Support using GeForce 8800 GT:  
[http://twitter.com/opengl/status/40904330320027648](http://twitter.com/opengl/status/40904330320027648)

Lion OpenGL Support using Intel X3100:  
[http://netkas.org/?p=609#comment-152379](http://netkas.org/?p=609#comment-152379)

All the above nVidia GPU’s support OpenGL 3.3 on Win/Lin.  
And yet clearly they are still stuck with GLSL 1.2 on Lion.

So there doesn’t seem to be complete OpenGL 3.2 or 3.1 or 3.0 support in Lion.  
Based on the screenshot in the first URL, it looks like OpenGL support is identical to that in Snow Leopard because that is what I am seeing on my 9400M Snow Leopard Mac.

---

<div class="post-metadata">

**Author:** ![imported\_JoshKlint](https://community.khronos.org/letter_avatar_proxy/v4/letter/i/53a042/32.png) [@imported\_JoshKlint](https://community.khronos.org/u/imported_JoshKlint)\
**Post date:** [February 26, 2011, 10:47am UTC](https://community.khronos.org/t/opengl-3-2-in-osx-10-7/63676/6 "2011-02-26T10:47:15Z")

</div>

I think it’s really pathetic. With the stability of Mac drivers they could take over high-end rendering. Although the hardware is capable of doing much more, our engine is going to use a renderer about on a level with Half-Life 2 on OSX. I don’t trust OpenGL 2.1 + extensions to write a deferred renderer, especially when I know the Apple engineers are almost certainly not designing their branched version of OpenGL with anything advanced in mind.

If they want Mac to be the creative / artist computer, they should support modern rendering functionality!

---

<div class="post-metadata">

**Author:** ![Alfonse\_Reinheart](https://community.khronos.org/user_avatar/community.khronos.org/alfonse_reinheart/32/4357_2.png) [@Alfonse\_Reinheart](https://community.khronos.org/u/Alfonse_Reinheart)\
**Post date:** [February 26, 2011, 1:59pm UTC](https://community.khronos.org/t/opengl-3-2-in-osx-10-7/63676/7 "2011-02-26T13:59:22Z")

</div>

> Not sure where macrumors is getting its information from but actual user reports don’t corroborate their story.

It’s possible that Apple added new functions to the Apple-specific MacOSX OpenGL interface to create GL 3.x contexts. Something like WGL\_ARB\_context\_create.

What makes this unlikely is that 3.2 introduced WGL/GLX\_ARB\_context\_create\_profile, which changed the wording of context\_create. Basically, it allows you to get compatibility specifications without using context\_create.

Now, it is “possible” that Apple is only implementing 3.2 core, in which case you would need something like context\_create to get a context. But that seems… unlikely.

---

<div class="post-metadata">

**Author:** ![malexander](https://community.khronos.org/user_avatar/community.khronos.org/malexander/32/150_2.png) [@malexander](https://community.khronos.org/u/malexander)\
**Post date:** [February 26, 2011, 3:21pm UTC](https://community.khronos.org/t/opengl-3-2-in-osx-10-7/63676/8 "2011-02-26T15:21:25Z")

</div>

> Not sure where macrumors is getting its information from but actual user reports don’t corroborate their story.

My guess is that Apple’s GL3.2 support isn’t mature enough for inclusion in the developer seeds yet. It’s due out in the summer, so they still have a bit of time yet.

Personally, I’d be happy with GLSL \> 1.20, texture buffer objects, uniform buffer objects, primitive restart and multisample textures, in addition to the GL3 extensions Apple already has.

> With the stability of Mac drivers they could take over high-end rendering.

Are you being ironic? Because I’ve had to work around over half a dozen OSX driver bugs in the past year (vs 2 apiece from Nvidia and AMD/ATI). Yes, part of that was due to a deferred renderer codepath 🙂

---

<div class="post-metadata">

**Author:** ![Alfonse\_Reinheart](https://community.khronos.org/user_avatar/community.khronos.org/alfonse_reinheart/32/4357_2.png) [@Alfonse\_Reinheart](https://community.khronos.org/u/Alfonse_Reinheart)\
**Post date:** [February 26, 2011, 4:13pm UTC](https://community.khronos.org/t/opengl-3-2-in-osx-10-7/63676/9 "2011-02-26T16:13:42Z")

</div>

> Because I’ve had to work around over half a dozen OSX driver bugs in the past year (vs 2 apiece from Nvidia and AMD/ATI).

Really? I’ve never done MacOSX development, but I always assumed that their OpenGL drivers were pretty stable. I’m curious to know what you had to work around.

---

<div class="post-metadata">

**Author:** ![imported\_JoshKlint](https://community.khronos.org/letter_avatar_proxy/v4/letter/i/53a042/32.png) [@imported\_JoshKlint](https://community.khronos.org/u/imported_JoshKlint)\
**Post date:** [February 26, 2011, 7:23pm UTC](https://community.khronos.org/t/opengl-3-2-in-osx-10-7/63676/10 "2011-02-26T19:23:32Z")

</div>

> Are you being ironic? Because I’ve had to work around over half a dozen OSX driver bugs in the past year (vs 2 apiece from Nvidia and AMD/ATI). Yes, part of that was due to a deferred renderer codepat

Did their drivers alter behavior at all during that entire time? I didn’t say they were compliant. I said they were stable.

---

<div class="post-metadata">

**Author:** ![malexander](https://community.khronos.org/user_avatar/community.khronos.org/malexander/32/150_2.png) [@malexander](https://community.khronos.org/u/malexander)\
**Post date:** [February 27, 2011, 7:33am UTC](https://community.khronos.org/t/opengl-3-2-in-osx-10-7/63676/11 "2011-02-27T07:33:13Z")

</div>

> I’m curious to know what you had to work around.

I work on a cross-platform CAD app (Windows, Linux, OSX) and have a Mac Pro triple booted between the three (latest OSX version, Ubuntu 9.10 64b, Win7 64b). Starting with 10.6.3, we began encountering a lot of regressions, until 10.6.5. Since OpenGL performance increased substantially between those releases, I’m guessing a lot of the issues were related to optimization work, and things have calmed down a lot since then. Often a regression would affect either Nvidia hardware or AMD hardware, but rarely both.

Most of the issues appeared to be GLSL compiler or FBO related, ranging from crashes that required an application features to be disabled, to minor issues that could be worked around by altering the shaders. Anyway, here are the ones I remember:

- Writing to more than one buffer in an FBO on Nvidia hardware produced a few random garbage pixels where polygons should have been, and nothing else. A crash would shortly follow a frame or two later. In another case, the entire OS desktop would go into a “flicker fit” where it would refresh properly down to a certain random scanline that changed with each frame, then display black. A reboot was required. At first I thought it was a bad card, but it was reproducible on other systems with Nvidia cards. AMD hardware on OSX was fine, as was Windows/Linux.

- gl\_FrontFacing stopped working on AMD cards and we had to roll our own using GLSL’s frontfacing() function.

- accessing gl\_LightSource in a constant loop didn’t work for awhile on Nvidia, requiring us to unroll it. A OSX version or two later, we had to consolidate the lighting loop into the same fragment shader as main() otherwise some uniforms that were definitely used were not in the active uniform list (the ones near the end of the list alphabetically, but within the max uniform limit).

- in the August graphics update, on AMD hardware I had to do a glGetTexImage on textures drawn to by an FBO render that weren’t attached to GL\_COLOR\_ATTACTMENT0 (depth attachment, color attachments 1+), otherwise they contained garbage when accessed by a shader later in the redraw. glFinish() didn’t do the trick either, only reading pixels from the texture fixed the issue.

- Early last year, uniform arrays (uniform int foo[8]) were suddently reported in the active uniform list as foo[0] rather than foo.

- In one fragment shader with an ‘if(expr) discard;’ statement, I had to also assign a dummy value to gl\_FragColor before the discard otherwise the fragment shader displayed black for all pixels.

We reported these issues to Apple as we tracked them down, and most of these issues were resolved within an update or two, but it was a pretty rocky road for a bit. I began to dread OSX updates 🙂 None of these problems affected the same system booted into Linux or Windows using AMD or Nvidia’s drivers.

> Did their drivers alter behavior at all during that entire time? I didn’t say they were compliant. I said they were stable.

Because of my experience, I couldn’t tell if you were being straight up with your comment or not. So I asked 🙂

I don’t believe Apple intentionally altered the GL behaviour, but it definitely altered the behaviour of our application. On the bright side, our app is no longer sluggish on OSX, as it was prior to 10.6.4. So, progress 🙂

---

<div class="post-metadata">

**Author:** ![bugmenot](https://community.khronos.org/user_avatar/community.khronos.org/bugmenot/32/4251_2.png) [@bugmenot](https://community.khronos.org/u/bugmenot)\
**Post date:** [March 1, 2011, 6:00am UTC](https://community.khronos.org/t/opengl-3-2-in-osx-10-7/63676/12 "2011-03-01T06:00:21Z")

</div>

Some good news on the Mac OpenGL 3.2 Front at least for ATI:

> NSOpenGLPixelFormatAttribute attributes = {  
> NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersion3\_2Core,  
> NSOpenGLPFADoubleBuffer, // double buffered  
> NSOpenGLPFADepthSize, (NSOpenGLPixelFormatAttribute)16, // 16 bit depth buffer  
> (NSOpenGLPixelFormatAttribute)nil  
> };

> GL\_VERSION = “3.2 ATI-7.0.52”  
> GL\_SHADING\_LANGUAGE\_VERSION = “1.50”  
> GL\_RENDERER= “ATI Radeon HD 4850 PRO OpenGL Engine”

> from x2000gldriver:

> ATI Technologies Inc.  
> 2.1 ATI-7.0.52  
> 3.2 ATI-7.0.52

[http://netkas.org/?p=642](http://netkas.org/?p=642)

---

<div class="post-metadata">

**Author:** ![malexander](https://community.khronos.org/user_avatar/community.khronos.org/malexander/32/150_2.png) [@malexander](https://community.khronos.org/u/malexander)\
**Post date:** [March 1, 2011, 8:54am UTC](https://community.khronos.org/t/opengl-3-2-in-osx-10-7/63676/13 "2011-03-01T08:54:06Z")

</div>

I’m hoping there is a NSOpenGLProfileVersion3\_2Compatibility as well, or similar attribute pair to request a compatibility profile.

---

<div class="post-metadata">

**Author:** ![przemo\_li](https://community.khronos.org/letter_avatar_proxy/v4/letter/p/3e96dc/32.png) [@przemo\_li](https://community.khronos.org/u/przemo_li)\
**Post date:** [July 21, 2011, 10:08am UTC](https://community.khronos.org/t/opengl-3-2-in-osx-10-7/63676/14 "2011-07-21T10:08:16Z")

</div>

Apple is silent about compatibility mode.

But you can still use 2.1.

---

<div class="post-metadata">

**Author:** ![malexander](https://community.khronos.org/user_avatar/community.khronos.org/malexander/32/150_2.png) [@malexander](https://community.khronos.org/u/malexander)\
**Post date:** [July 22, 2011, 12:21pm UTC](https://community.khronos.org/t/opengl-3-2-in-osx-10-7/63676/15 "2011-07-22T12:21:14Z")

</div>

I’m pretty doubtful that we’ll ever see a compatibility context from Apple. They prefer to keep developers current, it seems (64b apps were unavailable using the 32b-only Carbon API; if you needed 64b, you had to switch to Cocoa). I was hoping I could avoid a large sweep to update all the trivial rendering codepaths that used removed GL features, since all the other platforms we support have the compatibility extension.

---

<div class="post-metadata">

**Author:** ![imported\_JoshKlint](https://community.khronos.org/letter_avatar_proxy/v4/letter/i/53a042/32.png) [@imported\_JoshKlint](https://community.khronos.org/u/imported_JoshKlint)\
**Post date:** [November 16, 2011, 1:37pm UTC](https://community.khronos.org/t/opengl-3-2-in-osx-10-7/63676/16 "2011-11-16T13:37:24Z")

</div>

FYI I got word back from the driver dev team, and apparently I am not sharing textures between contexts correctly. So AFAIK this will work, although I haven’t implemented the fix yet.

---

<div class="post-metadata">

**Author:** ![system](https://community.khronos.org/uploads/default/original/2X/b/ba89cb49313a0e869198c8be354afde8bcae027e.png) [@system](https://community.khronos.org/u/system)\
**Post date:** [October 19, 2021, 5:15pm UTC](https://community.khronos.org/t/opengl-3-2-in-osx-10-7/63676/17 "2021-10-19T17:15:15Z")

</div>

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.
