1. 30

  2. 11

    I invested a lot of time into learning OpenGL and I was really bummed out when Apple dropped OpenGL support and more and more devices and programs started to use Vulkan. The fact that it takes 1000+ lines to render a triangle always turned me off. However, this article made the subject approachable.

    This article is intended to be a concise overview of the fundamentals of Vulkan. It was written for somebody who knew Vulkan but has forgotten many of the details (i.e. future me).

    I have never used Vulkan before, but the article made sense from start to finish. It sure made me feel like I knew Vulkan but forgot many of the details! I’m more likely to dive into Vulkan development now.

    It’s good to see that Vulkan addresses my biggest gripe with OpenGL, the “global state hell”, by making command buffers and their corresponding synchronization primitives explicit.

    1. 6

      Your comment on OpenGL “global state hell” is spot on. I’ve found that once I’ve gotten past the initial boilerplate setup, developing in Vulkan is much more enjoyable and easier to debug than OpenGL.

      P.S. I’m glad you enjoyed my article :)

    2. 2

      So has anyone made an “opengl” level api on top of vulkan?

      1. 3

        The WebGPU api is a higher level, easier to use layer on top of Vulkan, Metal and DX12. Native WebGPU libraries are available for Linux, MacOS, Windows, Android and iOS, plus the API will also be natively supported by javascript in web browsers, and it will be the standard GPU API for WebAssembly programs executed either inside or outside of a browser. There are two open source library implementations with a C language interface: Dawn, made by Google, written in C++, and wgpu, made by Mozilla, written in Rust. The API is still a work in progress, partially implemented, the design not yet complete. It is hoped to be finished at the end of this year. WebGPU is a portable API (write once, run anywhere), and only supports features that exist in Vulkan, Metal and DX12. It is not as powerful as Vulkan, and there will be a significant lag between bleeding edge features becoming available as Vulkan extensions, and those same features becoming available as WebGPU extensions (if they ever do). However, WebGPU is a more modern API than OpenGL, with a similar philosophy to Vulkan (asynchronous command queues), and with higher performance than OpenGL.

        1. 2

          Yep! GLOVE can be used as an intermediate layer between OpenGL ES and Vulkan.

          This also means you can run OpenGL ES applications on macOS like so: OpenGL –> (GLOVE) –> Vulkan –> (MoltenVK) –> Metal