Saw this from yesterday’s Apple conference. Obviously they are not removing GL from OSX anytime soon but that said, does Slicer (or maybe VTK?) already have support, or planned support, for Metal to replace GL?
Deprecation of OpenGL and OpenCL
Apps built using OpenGL and OpenCL will continue to run in macOS 10.14, but these legacy technologies are deprecated in macOS 10.14. Games and graphics-intensive apps that use OpenGL should now adopt Metal. Similarly, apps that use OpenCL for computational tasks should now adopt Metal and Metal Performance Shaders.
Metal is designed from the ground up to provide the best access to the modern GPUs on iOS, macOS, and tvOS devices. Metal avoids the overhead inherent in legacy technologies and exposes the latest graphics processing functionality. Unified support for graphics and compute in Metal lets your apps efficiently utilize the latest rendering techniques. For information about developing apps and games using Metal, see the developer documentation for Metal, Metal Performance Shaders, and MetalKit. For information about migrating OpenGL code to Metal, see Mixing Metal and OpenGL Rendering in a View.
That’s a shame (as in shame on Apple for pushing their proprietary solution instead of open standards). Microsoft does basically the same thing with DirectX.
I suspect it will be a long time (several years) before this has an impact on Slicer. VTK serves as an abstraction of OpenGL for Slicer, so there’s little or no OpenGL code in Slicer itself. In practice VTK only supports OpenGL currently, so porting VTK to Metal would be a big job. Maybe an adaptor layer like Angle would be used. I’m curious to hear what the VTK developers think about this.
Apple’s statement of “Games and graphics-intensive apps that use OpenGL should now adopt Metal.” is ridiculous. As if they don’t know how much work it can be for applications to switch graphics backends…
Instead of switching to Metal, it is much more likely that multi-platform application developers will use adaptor libraries, so application performance may get slightly worse on Apple compared to other platforms; and Apple will have less control over the graphics stack on macOS.
This is not happening yet and Slicer is not impacted directly anyway but it is still sad to see Apple behaving like this instead of collaborating on improving open standards.
I would point out that X is still supported on macOS (via a community project, but still). OpenGL isn’t going to disappear.
macOS’s OpenGL has always lagged behind the latest versions of the standard anyway: the latest versions on Apple hardware are 3.3 and 4.1, released eight years ago. I think Apple made this decision a couple of years ago and just didn’t tell anyone.
It’s an unfortunate decision, and one that Kitware should open up with Apple as a vendor-to-vendor discussion, but this isn’t going to have a perceivable impact on our community for a while.
Would I start an OpenCL-dependent project right now? No, but that was an iffy gamble anyway.