0

Okay, I may have heard wrong, but I thought Metal was a wrapper for vendor drivers of graphics cards. Like the vendors didn't rewrite their other platform drivers and did like an Opengl -> Metal wrapper instead. Or a Vulkan -> Metal wrapper. Now, out of curiosity I search for this, and I find that there are Metal -> Vulkan wrappers. So is it possible on MacOS to have a Vulkan -> Metal -> Vulkan setup now? Or even a Opengl -> Metal -> Vulkan? I know I have seen wrappers for Windows drivers so Linux can use them. But that was a while ago.

Comments
  • 2
    I'll try to answer in own words, as I think this makes it simpler.

    In Windows, we have DirectX.

    DirectX 12 added low-level programming APIs.

    In Apple, we have Metal - another low-level programming API.

    Vulkan is yet another low-level programming API, OS independent / cross platform by Khronos.

    Additionally, there is e.g. Mantle by AMD - which was the foundation for Khronos Vulkan API (mentioned for completeness, I think Mantle plays no role whatsoever anymore).

    Now the interesting aka brain damaged part....

    Theoretically (theoretically, important) any API could run another API.

    ... this isn't bound to low level programming APIs, which try to come as close to hardware as possible, but also for the "old" APIs like DirectX 11 and earlier, OpenGL etc.

    This is where the madness starts.

    There are several wrappers for APIs, eg. DXGL - DirectX to OpenGL, Zink - running OpenGL on top of Vulkan, etc.

    Like you said, it is *theoretically* possible to stack these. Practically it would not work.

    Most of these APIs are of course extremely specific - e.g. OpenGL has a lot of plugins, some vendor specific.

    It's impossible to support all OpenGL plugins, as some contradict each other or are plain opposites.

    Michael Blumenkranz blogs regarding Zink are a fun read...
    https://www.supergoodcode.com/

    Same goes for other APIs. DirectX e.g. is similar to Vulkan in some aspects, but imposes several different paradigms and limits in it's API.

    So wrapping is almost always a compromise and a walk on a tight rope.

    Note that this is only a short list...

    E.g. for compute shading, the same fragmentation of APIs exist, sadly.
  • 0
    @IntrusionCM This is why I just choose a game engine that already figured this crap out. What a mess.
  • 2
    Truth is directx does the innovation here, OpenGL follows suit because they have to deal with so much legacy cruft, and apple claims innovation when they, (as usual) arrive several years late to the party.
  • 1
    @CoreFusionX Depends on point of view.

    OpenGL has been dead for years.

    Microsofts interest in DirectX doesn't stem from Microsoft itself - more that Game Devs / Engine Devs lit a fire under their arse.

    AMDs Mantle came BEFORE DirectX 12.

    Frostbite Engine if I remember correctly.

    DirectX 12 wasn't a lucky thing either.

    If you search e.g. for DirectX 12 bad / bugs etc. you'll find a plethora of results of pissed people.

    The worst: It is already better than it was years ago. But it's still crappy. :(

    So no. Microsoft wasn't the innovation leader with DirectX 12. Nor will Microsoft be any innovation leader at all.

    Microsoft reacts when the people who keep Microsoft alive get pissed. That's the reality.

    OpenGL just sucks under Windows - which is the market for game development. That's true. :) But the reasons for it are obvious I guess. :)
Add Comment