mcpp index

khronos.vulkan-hpp

import

Vulkan-Hpp — Khronos C++ bindings, exposed as the C++23 modules vulkan / vulkan_video

import vulkan;
mcpp add khronos.vulkan-hpp@1.4.357.1

Usage

From this repository's own test project — built and run by CI, not written for the website.

// Behavioral test — consume Vulkan-Hpp through the C++23 named module
// `vulkan`, and assert the things a module build can get wrong quietly.
//
// There is not a single `#include` here, on purpose. `import vulkan;` has to
// deliver the whole surface by itself: a package that resolved, downloaded and
// linked but never compiled its module unit fails at the FIRST line of this
// file rather than passing with an empty build.
//
// The three groups below are chosen so that each of Vulkan-Hpp's four header
// layers is answered by something only that layer provides, and none of them
// needs a GPU, a driver, or an ICD manifest:
//
//   * vulkan.hpp                     — enums, structs, the `sType` defaults
//   * vulkan_format_traits.hpp       — constexpr format arithmetic
//   * vulkan_extension_inspection.hpp— the extension registry tables
//   * vulkan_raii.hpp                — the RAII wrappers, asserted by TYPE
//
// `vk::to_string` is asserted below for a reason worth stating: it lives in
// `vulkan_to_string.hpp`, which is NOT in the list of headers `vulkan.cppm`
// names — reading that list as exhaustive gets this wrong. `vulkan.hpp`
// includes it itself, guarded only by `VULKAN_HPP_NO_TO_STRING`, which nothing
// defines here, so it rides into the module purview and is exported. The check
// …

tests/examples/vulkan-hpp-module/tests/module.cpp · project tests/examples/vulkan-hpp-module

Build

modules
vulkan, vulkan_video
targets
vulkan_hpp (lib)
language
c++23
import std
yes

Sources (2)

  • */include/vulkan/vulkan.cppm
  • */include/vulkan/vulkan_video.cppm

Versions

VersionPlatforms Mirrorssha256
1.4.357.1 latest LinuxWindowsmacOS CN GLOBAL e87dce081161…
1.4.357.0 LinuxWindowsmacOS CN GLOBAL e87dce081161…