![]() |
wisdom
|
This page explains how Wisdom is organized and how that maps to the targets used in examples.
Wisdom provides a single API surface with backend-specific implementations under it. The public interfaces are generated and kept consistent across C and C++ bindings.
In typical projects, you link one core target and one platform target:
wis::wisdom + wis::wisdom-platformwis::wisdom-shared + wis::wisdom-platform-sharedThis is the same linking pattern used by examples such as hello_triangle.
Wisdom sits above DirectX 12 and Vulkan with a minimal abstraction layer. Backend code is split into two families:
wisdom/dx12 for DirectX 12wisdom/vulkan for VulkanHigh-level aliases in <wisdom/wisdom.hpp> map to backend-prefixed types:
wis::DX12* on DirectX 12 buildswis::VK* on Vulkan buildsThe main include is <wisdom/wisdom.hpp> for core objects and API entry points. Platform extensions are exposed through <wisdom/wisdom_platform.hpp>.
On Windows, DirectX 12 is the default backend. Vulkan can be forced with WISDOM_FORCE_VULKAN (CMake option or preprocessor define).
Use public .hpp headers in C++ and .h C headers for C/C99 integration.
For regular usage, prefer generic aliases (wis::Instance, wis::Device, wis::Buffer, ...). If explicit backend control is needed, use prefixed types (wis::DX12* / wis::VK*) directly.
The C++ API uses wis::span in many places. It is intentionally similar to C++20 std::span, but remains compatible with C++11. This keeps call sites consistent and improves safety through explicit bounds-aware range passing.
The examples mostly use generic aliases and target-based linking, which is the recommended default.
Objects follow RAII lifetime management and are move-oriented for low-overhead ownership transfer.
Most operations report status with wis::Result. C++ helpers keep call sites compact while preserving explicit error handling.
Example:
Extension points are intentionally open-ended. Internal handles can be queried via GetInternal / GetMutableInternal when integrating custom backend-specific functionality.