Skip to content

asuessenbach/Vulkan-Hpp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2,410 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vulkan-Hpp: C++ bindings for Vulkan

Overview

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.

CI/CD status

Platform Build Status
Windows CI Windows Clang
CI Windows MSVC
Linux CI Ubuntu 22
CI Ubuntu 24
macOS CI MacOS

Documentation

All other documentation is in docs:

  1. Building describes how to configure, build, and generate new headers.
  2. Usage explains how to use the various features of Vulkan-Hpp with detailed examples.
  3. Configuration lists all the options available to configure the behaviour and features of Vulkan-Hpp.
  4. 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 also vk::raii types, 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.

Installation and usage

Vulkan SDK

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.

vcpkg

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-headers

For support, create an issue or pull request on the vcpkg repository.

Conan

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.

Breaking Changes

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.

v1.4.334

The vulkan_hpp C++ named module has been renamed to vulkan.

v1.4.324

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>

v1.4.329

With PR #2303, import std was made mandatory when using the C++ named module.

Contributing

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.

License

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.

About

Open-Source Vulkan C++ API

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 99.6%
  • CMake 0.4%