Given the comparable performance of OpenGL and Metal on the same hardware I was under the impression that is how Apple had been implementing OpenGL for quite a while.
OpenGL on Apple GPUs is implemented on top of Metal with some private extensions to be closer to OpenGL behaviour. Making things work performantly on top of regular Metal is quite a bit harder.
In practice this is sufficient for the overwhelming majority of apps. Apple never went past GL 4.1 on the desktop side, and doesn't support most of the interesting desktop-only features (tessellation and geometry shaders, mostly), so ES 3.1 targets desktop macOS fairly cleanly.
There's some libraries like wgpu that can fill this gap in practice
Minecraft has been moving to Vulkan and using MoltenVK to run the same backend on Mac.
In that case maybe the answer is $200 in tokens to make a metal OpenGL shim and then share it to the community on GitHub.
Given the comparable performance of OpenGL and Metal on the same hardware I was under the impression that is how Apple had been implementing OpenGL for quite a while.
OpenGL on Apple GPUs is implemented on top of Metal with some private extensions to be closer to OpenGL behaviour. Making things work performantly on top of regular Metal is quite a bit harder.
1 reply →
ANGLE already does that: https://chromium.googlesource.com/angle/angle
Isn't https://github.com/google/angle just that?
Edit: I guess no, Angle is OpenGL ES. My bad.
> Angle is OpenGL ES
In practice this is sufficient for the overwhelming majority of apps. Apple never went past GL 4.1 on the desktop side, and doesn't support most of the interesting desktop-only features (tessellation and geometry shaders, mostly), so ES 3.1 targets desktop macOS fairly cleanly.
Metal is universally supported among Apple's product lines.
Just as useful as DirectX being universally supported in Microsoft's product lines.
The point of OpenGL was to have an API universally supported everywhere
That's a bad analogy
4 replies →
Everything is universally supported in a small enough universe.