Vulkan-Hpp provides header-only C++ bindings for the Vulkan C API to improve the developer experience with Vulkan without introducing run-time CPU costs. It adds features like type safety for enumerations and bit-fields, STL container support, exception support, and several varieties of RAII-capable types.
This repository contains the generators for Vulkan-Hpp, which accept the XML specification of Vulkan and emit C++ bindings, which are documented further below.
| Platform | Build Status |
|---|---|
| Windows | |
| Linux | |
| macOS |
All other documentation is in docs:
- Building describes how to configure, build, and generate new headers.
- Usage explains how to use the various features of Vulkan-Hpp with detailed examples.
- Configuration lists all the options available to configure the behaviour and features of Vulkan-Hpp.
- Handles is an overview of the three different families of handles provided by Vulkan-Hpp. These allow semantics similar to
std::unique_ptr,std::shared_ptr, and alsovk::raiitypes, which are RAII (resource acquisition is initialisation) handles that offer object-oriented semantics for Vulkan handles.
Note
All macro configuration options available in the C API are also available and used in Vulkan-Hpp.
Vulkan-Hpp has been part of the LunarG Vulkan SDK since version 1.0.24; this remains the recommended installation method. If you need a more recent version than the SDK supports, then Vulkan-Hpp is also distributed as part of the Khronos Group Vulkan-Headers repository.
As above, Vulkan-Hpp is provided in the vulkan-headers port in vcpkg.
Otherwise, you can also install the vulkan-sdk-components port, which is a vcpkg equivalent to the LunarG-distributed Vulkan SDK.
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh
./vcpkg integrate install
./vcpkg install vulkan-headersFor support, create an issue or pull request on the vcpkg repository.
Similar to vcpkg, Vulkan-Hpp can be installed as part of the vulkan-headers recipe.
The vcpkg and Conan packages are kept up to date by Microsoft and members of the community. Requests for updates and issues with these packages should be directed to their respective repositories rather than here.
We try to keep the API for all flavours of Vulkan-Hpp constant or backwards compatible. However, we may introduce unavoidable breaking changes, usually to fix bugs. Following is a list of those changes, arranged by version.
The vulkan_hpp C++ named module has been renamed to vulkan.
With PR #2226, the return type of vk::raii::Device::acquireNextImage2KHR and vk::raii::SwapchainKHR::acquireNextImage has changed from std::pair<vk::Result,uint32_t> to the equivalent vk::ResultValue<uint32_t>
With PR #2303, import std was made mandatory when using the C++ named module.
Feel free to submit a PR to add to this list. You should use clang-format version 21.1.0 to format the generated files.
- Examples A port of Sascha Willems examples to Vulkan-Hpp
- Vookoo Stateful helper classes for Vulkan-Hpp, Introduction Article.
Copyright 2015-2026 The Khronos Group Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.