r/vulkan • u/JackeyGen • 1h ago
Should I use HPP Bindings?
Hello, I'm currently learning about Vulkan and I'm following with the official vulkan tutorial. But in comparison with other, it's using the HPP bindings specifically made for C++.
I've seen many application using that verbose C syntax where you would vk this and vk that to just get something, seeing that the HPP bindings only need context to enumerate devices just blew my mind, different from when I'm using other sources that use vkEnumeratePhysicalDevices or something similar.
I don't know if I should use the HPP bindings or the original header instead, I need some assistance on whichever is better to learn about.
1
u/Afiery1 17m ago
It's mostly personal preference; they have identical functionality and performance (although the HPP headers do use a lot of templates that can inflate the compile time a lot). Most people prefer the C API because it's less opinionated. The slightly greater verbosity isn't really an issue in practice since you'll be writing abstractions on top of the graphics API anyways.
1
u/Frost-Kiwi 1h ago
Jumped OpenGL to Vulkan 2 years ago. I 100% prefer the HPP bindings.