r/GraphicsProgramming • • Oct 20 '26

Question What do you think of vulkan?

Is it worth learning it as someone who is still relatively a beginner/early mid level c++ programmer for graphics or are other alternatives better?

32 Upvotes

54 comments sorted by

View all comments

5

u/aman2218 Oct 20 '26

I have been recently checking out SDL_gpu, and finding it quite pleasant to use.

It's very similar to WebGPU (And I guess Metal? Haven't worked with it, but a couple of examples I have seen online looks similar), in that it follows current PSO/cmdlist approach to program on the GPU, but keeps the level of configurability and verbosity to sensible minimum, as apposed to Vulkan.

Maybe give that a try.

And if you're exploring the actual CG part of graphics programming (algorithms/techniques) as apposed to GPU programming/plumbing part, it's still highly benifitial to learn OpenGL, bcos of how dead simple it is to implement a job in it. It lets you quickly get done with plumbing thr data into the pipeline, so you can focus more on the shaders, and the actual good stuff.

1

u/ANSystemTech Oct 20 '26

I heard about it, but what is its applications to actual things (eg game graphics, more basic stuff or what exactly)

2

u/aman2218 Oct 20 '26

It's a graphics API (just like OpenGL or Vulakan) and comes as a part of SDL3 library. It's a higher level API defined on top of native APIs (which are defined by GPU drivers) like Vulkan and Direct3D and aims to provide a more contemporary looking API with enough control, but without the verbosity and details of stuff like Vulkan.

Just like, OpenGL or Vulkan, there are function calls to define the pipeline state, attach shaders, allocate data buffers and upload data to them, define render targets and attach other resources, like textures, push uniforms and ultimately issue the draw calls for the GPU to render the desired primitives as per the pipeline configuration.

The shaders you define, form the meat of your graphics application and they are what actually runs on the GPU. They describe how to transform your geometry and how to shade the rendered pixels, at the most basic level.

Rest is all there to, interface the CPU side of the application to a the pipeline running on the GPU. To provide the data (the geometry, textures and other stuff) to be transformed through the pipeline to pixels on the screen.

Along with stuff like WebGPU (another popular intermediate level API with similar goals), SDL_gpu can be a nice stepping stone to understanding the basics, before spending the long process that is learning Vulkan (and it will be long, even with experience. It has to be a serious commitment). You can also checkout WebGPU but I feel that it's much enjoyable to use in the browser and not natively. The libraries available to to natively use WebGPU are also kinda annoying to use.

Direct3D12 is relatively better balanced alternative, but 1) it only runs on windows 2) COM code can be cancerous to type/look at and 3) It builts on top of the legacy Direct3D in terms of API design. So things are not as consistent as that in Vulkan, which was designed from the ground up. 4) More importantly, there are more resources to learn Vulkan than Direct3D.