3 ms·
If you've never done graphics programming before, I wouldn't recommend starting with Vulkan. I would start with WebGPU via either wgpu (Rust + various bindings)
by jms55 2y ago
If you've never done graphics programming before, I wouldn't recommend starting with Vulkan. I would start with WebGPU via either wgpu (Rust + various bindings), dawn (C++), or the browser (JS). Or do raytracing on the CPU.
Once you've made a fairly capable engine, have rewritten it 1-3 times and are very comfortable with it, and are looking at profiles and going "hmm I wish I could do X to optimize this but WebGPU lacks support for it", then I would learn Vulkan.
Vulkan (and DirectX12) are targeted at existing engine developers who want to optimize every aspect of the rendering engine. It's not a very forgiving API, and learning the API (and how to use it optimally) is just one aspect of graphics programming. There's also linear algebra and coordinate spaces, PBR rendering theory, etc. It's a very involved field that's quite different from other programming fields.
RE: Vulkan requiring thousands of lines of setup, I think some of it is fair and some of it is not. Extension handling is definitely fairly cursed imo compared to how DirectX12 handles it. Memory allocation is rarely something that needs manually writing, using VMA is plenty good for 99% of use cases. On the other hand, device, queue, and swapchain selection and synchronization are all important. Sure there's a "simple" path where you just select the first device, the main queue, and use the default swapchain choice, but it can get complicated. Transfer and compute queues are important, and are a bit involved in requesting. Swapchain pacing is complex to get right, and you may want to support HDR/WCG displays. Vulkan gives you a lot of control, which is overwhelming at first, but useful for a lot of people.