3 ms·
Oh, so that's what Vulkan is for. I've been wondering why it exists as I learn graphics programming. I've read that it's faster than OpenGL but also much harder
by boppo1 4y ago
Oh, so that's what Vulkan is for. I've been wondering why it exists as I learn graphics programming. I've read that it's faster than OpenGL but also much harder to program for (which is saying something because OpenGL takes some not-insignificant mental gymnastics, at least for a beginner) or vice versa.
- josephg 4y agoVulkan is needed because the performance trade offs made by OpenGL / direct3D aren’t appropriate for some graphics engines. Vulkan allows knowledgeable & well funded developer teams (like Unreal) to make their own abstraction layer on top of the graphics card’s capabilities. And in doing so, get more performance out of their engines. Having only OpenGL/D3D was like if the only way you could do network programming was via python. Python is easy enough to use but it’s not well optimized in every use case. Vulkan is like the C of graphics programming. It’s useful when you want to get in there at a lower level, because the higher level abstractions leave too much performance on the table.
- valenceelectron 4y agoVulkan is not limited to Linux at all. In fact, it is an open standard made by the same people as OpenGL. OpenGL was a high level interface, so to speak. And due to this, it made some things easier and other things harder. Most notably, you didn't have the low level access some people/projects wished for. Some time ago, there was a push for a more low level interface and Vulkan was supposed to be the platform-independent, open solution. Naturally, when your interface is lower level, you also need to provide more boilerplate. So Vulkan is slower to get up and running but that's not a particular fault of Vulkan I'd say. The story around it is rather interesting. It is based on AMD Mantle which was discontinued on behalf of Vulkan. Unfortunately, not every vendor was pleased with an open interface. Microsoft released DirectX 12 and Apple released Metal as direct competitors with very similar (if not identical) goals, fragmenting the whole landscape in the process. Today, Vulkan is supported on Linux and Windows. Apple provides GPU drivers for macOS themselves (not the GPU vendor) and never implemented Vulkan support to not cannibalize its own Metal (I suppose). However, there exists MoltenVK, an open project that creates a translation layer from Vulkan to Metal.