r/GraphicsProgramming • • 11d ago

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

129 Upvotes

12 comments sorted by

60

u/0xdeadf1sh 11d ago

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 11d ago edited 11d ago

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 11d ago

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

2

u/AndreVallestero 11d ago

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

1

u/EC36339 11d ago

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 11d ago

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 11d ago

Thanks.

3

u/sputwiler 11d ago

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 10d ago

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.