-
-
Notifications
You must be signed in to change notification settings - Fork 33
Why doesn't dlib support macOS
Since 06.06.2018, I don't care for macOS compatibility in my projects, including dlib. CI builds for macOS were stopped. You probably still can use dlib's OS-independent and Posix-based functionality under macOS, but new features won't be purposefully ported to it, and possible compatibility issues won't be resolved.
The reason behind this is not technical, but political. Apple announced that OpenGL, an open standard for high performance graphics API, will be deprecated in macOS 10.14 Mojave in favour of Apple's proprietary Metal API. As an apologist of FOSS movement, I can't agree with such policy because it seriously affects the world of open computing.
For many years OpenGL was major solution for cross-platform graphics application development. It is an open standard which anyone is free to use and implement without license fees and patent restrictions. Thus games and graphics applications using OpenGL can be ported between different platforms with little or no effort, and using OpenGL means abstracting away of underlying technology, be it proprietary driver or a free alternative such as Mesa.
Using open standards is a good thing to do. And tying yourself to system-specific APIs, in general, is not. By deprecating OpenGL, Apple forces you to use their non-standard proprietary technology. Supporting both OpenGL and Metal in one application is an option, but doing so can make the application cumbersome and ineffective. And usually supporting multiple APIs in a game engine is an unaffordable luxury for one-man or low-budget projects. This means that Apple intentionally tries to make writing macOS-only applications advantageous over cross-platform development. This is not something I can close my eyes on, despite I never was an Apple user.
Now, as a dlib user, why should you care? dlib is a collection of libraries designed, among other tasks, for game development. And it is a Free and Open Source project. It doesn't, of course, interact directly with OpenGL and can be used with any graphics API. But it likely would never exist if there was no OpenGL. When I started dlib as an Open Source project, my goal was to help D game developers by providing them a set of basic tools that would play nicely with OpenGL, OpenAL, SDL, and other cross-platform solutions. It just felt natural to use them with D, which is also fully cross-platform. If I had to stick with platform-specific API, such as Direct3D for instance, I would rather use C++ with existing libraries.
For open and cross-platform game development, OpenGL is more important than anything else. Direct3D is Windows-only, Metal is Apple-only, and Vulkan is not a direct replacement for OpenGL, being considerably less documented, less widespread, too low-level and hard to use. It's not easy to port existing OpenGL applications to Vulkan, and usually there's little benefit from such port. And Vulkan is also not oficially supported under macOS, so the problem is even deeper. Until there's a drop-in replacement for OpenGL, its importance can't be overestimated.
Whether you are a game developer or not, by using and supporting macOS, you support platform closiness and vendor lock-in. Dropping macOS support from dlib and my other projects was my act of protest against these. It's not about discriminating macOS users, it's about fighting for customer and developer freedom. If Apple doesn't want or can't afford to support industry standard API, it should at least allow third-party GPU drivers.
If you are a macOS user, please apologize for any inconvenience this decision might cause to you. I suggest switching to an open Unix variant, such as Linux. Hope for your understanding.
Timur Gafarov, creator and maintainer of dlib