[opensource-dev] Mac viewer and Apple maintained opensource libraries

Geir Nøklebye geir.noklebye at dayturn.com
Wed Feb 1 22:25:06 PST 2017


Cinder said

> It's not a viewer bug, it?s an issue with Apple's Nvidia driver. (also note, that it doesn?t happen with Radeon or Nvidia?s own driver, just Apple?s and happens to hundreds upon hundreds of games available on Steam.)

Apple Software Engineering has acknowledged that such crashes will happen but it is in status “will not fix” because this is expected behavior. (I have this as an open acknowledged Radar)

in llopenglview-objc.mm there is a NSOpenGLPixelFormatAttribute attrs[] statement where there is a comment in the code that 10.7 and 10.8 don’t care about defining a profile or not.

But from 10.11 it cares A LOT!

Unless you define a profile of NSOpenGLProfileVersion3_2Core the system will force you to the NSOpenGLProfileVersionLegacy, which will not give you access to extensions such as GL_ARB_occlusion_query2.

Before 10.11 you could work around it by going directly to the hardware address of the extension (which the current viewer code does), but from 10.11 there is NO WAY of getting to it unless you have used NSOpenGLProfileVersion3_2Core and rewritten the renderer for it. 

The reason for this that from 10.11 Apple started compositing the macOS desktop with Metal, and this change made it necessary to very tightly control access to the GPU without disaster striking. 

Already at the WWDC where 10.10 was introduced Apple strongly urged developers to rewrite their code to use the NSOpenGLProfileVersion3_2Core profile. If you use this profile, the viewer will not compile. 


More information about the opensource-dev mailing list