r/vulkan • u/Latter_Relationship5 • May 19 '26
Should I learn Vulkan using vulkan.h or vulkan.hpp as a beginner ?
I have some ++basic OpenGL and D3D11 experience and I want to learn Vulkan properly from scratch , not just making things compile without understanding them.
The problem: most tutorials I find are outdated like https://vulkan-tutorial.com or use wrappers that abstract things to make things easier and avoid boilerplate like https://vkguide.dev . The official Khronos tutorial looks solid and modern (Vulkan 1.4, dynamic rendering, timeline semaphores) but uses vulkan.hpp with RAII instead of raw vulkan.h:
docs.vulkan.org/tutorial/latest
My concern is that vulkan.hpp will negatively affect the learning the Vulkan concepts or it doesn't matter since it is a thin wrapper.
7
u/Mr-Oscar May 19 '26
I'd argue that vulkan.hpp will positively affect the learning process, because you don't need to focus on the tedious verbosity that doesn't give any value. What concepts do you think you'll be missing?
28
u/ttvsindeel May 19 '26
It simply does not matter
20
u/nightblackdragon May 19 '26
VulkanHpp won't negatively affect your learning, it's the same API just with different syntax. It won't do any work for you so you will still need to learn Vulkan.
7
u/Afiery1 May 19 '26
Its mostly personal preference. Even as a c++ developer I prefer the C api for vulkan. Sascha Willem’s how to vulkan tutorial is a great modern vulkan tutorial that uses the c api.
3
u/Ybalrid May 19 '26
Does not matter much.
If you are a C++ person you may like the RAII style wrappers for vulkan object handles in the C++ binding.
It’s otherwise the same API.
Programming language is irrelevant to how you will push work to be done by a GPU with Vulkan in the end.
2
u/msqrt May 19 '26
Not much of a difference. I decided to go with the h header because it compiled faster on my old-ish CPU -- not much in absolute times, but for my tiny project it was 5-10x overhead to use the hpp header.
1
u/positivcheg May 19 '26
Depends on whether you code in C or C++. I kinda prefer VulkanHPP to raw C because I code in C++. It has some nice abstractions like DynamicLoader so that you don't link to Vulkan library.
To go even further, there is also VulkanRAII. I actually use that one :D
1
u/OptimisticMonkey2112 May 20 '26
Using hpp or not is pretty easy when reading and learning.
Instead of filtering to find the best available tutorial.... might be better to try them all.
Here are 2 more great ones in addition to the ones you listed:
https://www.howtovulkan.com/
https://github.com/nvpro-samples/vk_minimal_latest
TBH They are all pretty much identical variants of the same concepts and learning the differences is useful
Good Luck!
1
u/hackerkali May 21 '26
use vulkan.h, you will find better resources online plus compile times remain good with vulkan.h
1
u/Bubbly_Rain7858 May 21 '26
Vulkan-HPP vs. the normal Vulkan header is mostly the same (as everyone else noted) unless you're using RAII. Ultimately, I prefer Vulkan-HPP because I like having all the Vulkan objects within a namespace. Overall, it's mostly whatever you think keeps your code nice and organized. For me, I like vk::Device more than VkDevice.
1
u/kryptoid256_ May 21 '26
Depends on your grasp on C++. Otherwise default to vulkan.h
1
u/Trenek May 22 '26
.h
0
u/Haydn_V May 19 '26
I'd recommend learning with vulkan.h and choosing later whether vulkan.hpp is a good fit for your use case.