A new macOS is upon us and Mojave is packed with new features sure to delight consumers and aficionados alike. The WWDC 2018 keynote showed the grounds being made in AR and using the Metal graphics framework for its development. This push has also prompted Apple to deprecate both the OpenGL and OpenGL frameworks.
- Why deprecate OpenGL and OpenCL
- The inherent benefits of Metal
- How this affects the end user
- What's your take?
Why deprecate OpenGL and OpenCL
Apple wants to ensure that in the future, all applications that use the OpenGL standard (and the iOS equivalent OpenGL ES) switch to Apple's own Metal API. Similarly, it also wants the swift to be made for all computation tasks that use OpenCL, also switching to the Metal framework. Typically, using an open standard like OpenGL and OpenCL allows for developers to more easily make cross-platform applications. Creating the same application over multiple OSs using different APIs is time consuming and costly. So it's easy to see why a developer would do so. Apple's stance on deprecating software is the following:
Periodically, Apple adds deprecation macros to APIs to indicate that those APIs should no longer be used in active development. When a deprecation occurs, it's not an immediate end of life for the specified API. Instead, it is the beginning of a grace period for transitioning from that API and to newer and more modern replacements. Deprecated APIs typically remain present and usable in the system for a reasonable time past the release in which they were deprecated. However, active development on them ceases, and the APIs receive only minor changes to accommodate security patches or to fix other critical bugs. Deprecated APIs may be removed entirely from a future version of the operating system. As a developer, avoid using deprecated APIs in your code as soon as possible. At a minimum, new code you write should never use deprecated APIs. And if your existing code uses deprecated APIs, update that code as soon as possible.
The inherent benefits of Metal
Apple also goes on to explain why it's better to switch to Metal over the open standards:
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.
How this affects the end user
Ultimately, this will not affect consumers overall. Developers interested in maintaining a program will simple make the switch internally in their application transparently to the consumer. Developers that use major graphics engines such as Unity and Unreal have Metal support built in already so the transition is already done. There is also a push for the multi-platform Vulkan graphics API (under the MoltenVK API since Apple nixed direct Vulcan access on macOS) by some developers more keen on being able to still develop with multi-platform APIs.
What's your take?
Are you a developer? Are you using OpenGL and OpenCL in your applications? Will the switch to Metal and deprecation of OpenGL and OpenCL be seen as something you welcome or is it enough to push you to another platform? Some say that this also means the death knell of webGL as well. What's your take? Let us know in the comments!
What about Vulkan?
It doesn't look like this has any effect on Vulkan
Honestly, I don't mind this. OpenGL and OpenCL has really caused developers to use least common denominator API sets on platforms instead of targeting more platform-optimized solution. This applies to both macOS and Windows. Use DirectX (Direct3D, DirectWrite, DXVA, etc.) and Metal, IMO. Yes, it's more work if you do cross platform development (though frameworks can mitigate that to some extent), but it delivers a better end-user product. What Serif is doing with their Affinity apps is a good example of this. They use platform-specific APIs on both operating systems, skipping much of the generic stuff. On the other hand, it's bad for users with older PCs. A lot of older AMD graphics cards have full OpenCL 1.2-2.1 support, for example, while they are pretty lackluster when it comes to Metal compatibility. An OpenGL/OpenCL implementation likely is better for those machines. I expect developers to cling onto OpenGL/OpenCL as long as possible, with a few simply not bothering to port to macOS if they were thinking about it; because it's too much work for such a small market.
How does Vulkan compare to these? It's interesting how most (if not all) cross-platform solutions end up reducing performance to some degree, I guess it always requires some sort of wrapper which can't provide the necessary optimisations for each OS, similar with things like Flash, Java and Electron.
Thank you for signing up to iMore. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.