kusw
kusw

Reputation: 43

What does it mean that Apple doesn't support OpenGL?

I have found out that Apple deprecated OpenGL starting with MacOS Mojave.

However from my understandings on graphic APIs, I know that the graphic driver for specific OS (which supports specific graphic APIs) is provided by graphic card vendor (In the form of an executable file), not pre-built in OS.

What does it mean that Apple, the OS manufacturer, do not support OpenGL library?

Can't graphic card vendors like AMD just make their graphic driver for MacOS to support the later version of OpenGL?

Upvotes: 3

Views: 2940

Answers (1)

Nicol Bolas
Nicol Bolas

Reputation: 473322

Can't graphic card vendors like AMD just make their graphic driver for MacOS to support the later version of OpenGL?

No.

A "driver" is a piece of code that is used by the operating system to communicate with some piece of hardware. The OS defines a means of interacting with drivers of certain types, and makers of hardware for those types of things provide implementations of the driver APIs defined by the OS.

When it comes to interacting with hardware, userland code can interact with a driver exactly and only to the extent that the operating system allows it.

When you talk to OpenGL on MacOS, first and foremost you are talking to MacOS. Your OpenGL function call goes into the operating system. The OS then translates that GL function call into an internal API implemented by graphics driver makers, which the OS then calls. Any results are translated from those internal driver APIs and forwarded back to you.

You never talk directly to the graphics driver; MacOS always sits as the intermediary between you. Graphics drivers on MacOS don't contain OpenGL implementations; MacOS itself has an implementation, but part of it gets provided by graphics drivers.

This is why on MacOS, the list of extensions supported by implementations lacks a lot of vendor-specific extensions. If you look at Windows or Linux OpenGL implementations, AMD and NVIDIA have loads of extensions they support. Those don't exist on MacOS, because MacOS controls what extensions are available.

It didn't have to do that; it could have allowed the driver to expose whatever it wanted, which was done on other platforms. But those were specific choices made by those platforms; they didn't have to do it that way, and Apple did not.

As such, if MacOS no longer contains an OpenGL implementation... then it no longer has an OpenGL implementation. And you can't talk to that internal driver API because that belongs to the OS and it doesn't let you have access to it.

And there's no way for graphics card makers to stick a backdoor or something in to allow you to access the driver because the OS is always in control. The OS owns the interface to the hardware. And if vendors tried to create some hook that bypasses the OS somehow, I'm pretty sure Apple would have something very unpleasant to say about those drivers.

Upvotes: 8

Related Questions