khronos.vulkan-hpp
importVulkan-Hpp — Khronos C++ bindings, exposed as the C++23 modules vulkan / vulkan_video
import vulkan;
mcpp add khronos.vulkan-hpp@1.4.357.1
用法
來自本倉庫自己的測試專案 —— CI 真的編譯並執行過,不是為了網站寫的。
// 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 · 專案 tests/examples/vulkan-hpp-module
建置
- modules
vulkan, vulkan_video- targets
vulkan_hpp (lib)- language
c++23- import std
- yes
原始檔 (2)
*/include/vulkan/vulkan.cppm*/include/vulkan/vulkan_video.cppm