r/GraphicsProgramming • • Oct 31 '26

Vulkan 1.4 with RAII headers is absolute joy to work with!

131 Upvotes

12 comments sorted by

60

u/0xdeadf1sh Oct 31 '26

I used https://docs.vulkan.org/tutorial/latest and oh boy have things changed! No more renderpass, no more pNext chaining shenanigans thanks to the raii headers, no more .sType = blahblah... I remember writing my first vulkan renderer when the tutorial first came up and it was horrible so I sticked to opengl. Now I think is the best time to start writing vulkan.

30

u/AndreVallestero Oct 31 '26 edited Oct 31 '26

Vulkan-Hpp RAII 1.4 with C++23 is honestly not much harder than the standard from 10 years ago (GLEW with C++11), and is way more powerful. We've come a long way.

2

u/VictoryMotel Oct 31 '26

Does that header now open a window or do you still need to get that from somewhere else?

2

u/AndreVallestero Oct 31 '26

You still need the window from somewhere else, everyone uses GLFW.

1

u/EC36339 Oct 31 '26

Is there any downside of using GLFW for games? For example, is it good enough for handling input?

I never had problems with it so far. What I didn't test is controller input.

13

u/AndreVallestero Oct 31 '26

More of a gamedev question than graphics programming, but no, there shouldn't be any downside of using GLFW for games. It has a joystick API that can handle controller inputs. That being said, SDL3 has much broader input support, and I'd recommend that over GLFW if you're planning on doing more than just keyboard and mouse.

1

u/EC36339 Oct 31 '26

Thanks.

3

u/sputwiler Nov 01 '26

AFAIK SDL supports more platforms (consoles) and more controllers (I believe unlimited simultaneously). It also tries to do more so if you want something lighter GLFW might be better.

I also just use SDL because it's what I'm used to.

1

u/EC36339 Nov 01 '26

Thanks.

I'm targeting PC only, and anything you'd build on top of raw input I've already built the way I want it. So I'm mostly thinking about the stuff I can't fix from the outside, such as hardware support and latency, etc.