Khronos Group, the organizational body behind OpenAL, OpenCV, OpenGL and it’s successor Vulkan, have just released Vulkan-hpp on Github.
Khronos introduces Vulkan Hpp, an open source Vulkan C++ API. Vulkan is a C API and as such inherits all common pitfalls of using a general C programming library. The motivation of a low-level Vulkan C++ API is to avoid these common pitfalls by applying commonly known C++ features while keeping the overall structure of a Vulkan program and preserving the full freedom it provides as low-level graphics API
As the description says, it’s a C++ API over top of the C based Khronos API. The design goal is to add no additional overhead over using the C API, implemented entirely using header files. Some of the headline features are:
- Type-safe enums
- Improvements to Bit Flags
- String Conversions
- Alternative Initialization of Structs
- Enhancements beyond native Vulkan
- Exceptions and Returns Types
There are a collection of C Vulkan examples ported to the new C++ wrapper available here.
To get started with Vulkan-Hpp:
- Clone the repository:
git clone https://github.com/KhronosGroup/vkcpp
- Update submodules:
git submodule update --init --recursive
- Use CMake to generate a solution or makefile for your favourite build environment
- Launch the build
Vuklan-Hpp is available for download on Github here.