mirror of
https://github.com/nicbarker/clay.git
synced 2025-12-23 17:41:06 +00:00
| .. | ||
| CMakeLists.txt | ||
| main.cpp | ||
| README.md | ||
Clay Vulkan Demo
This Visual Studio 2022 friendly sample shows how to pair Clay's layout engine with a Vulkan swapchain. It uses GLFW for the Win32 surface and stitches Clay render commands through the Vulkan renderer adapter.
Build prerequisites
- Vulkan SDK installed and the
VULKAN_SDKenvironment variable set. - Visual Studio 2022 with CMake and the MSVC toolset.
- Git submodules are not required because GLFW is fetched automatically through CMake's
FetchContent.
Configure and build (Visual Studio 2022)
- Open a Developer PowerShell for VS 2022 so the compiler environment variables are available.
- Generate a build directory:
cmake -S examples/vulkan-demo -B build/vulkan-demo -G "Visual Studio 17 2022" -A x64 - Build the executable:
cmake --build build/vulkan-demo --config Debug - Run the demo from the build tree (the app opens a GLFW window):
build/vulkan-demo/Debug/clay_examples_vulkan_demo.exe
Notes and future work
- The code is intentionally verbose and commented with links to the Vulkan SDK reference and the ImGui wiki for font atlas/descriptor sharing advice.
- Swapchain, render pass, and command buffer setup are present, but pipeline configuration uses placeholders so you can wire your own shaders.
- TODOs remain for dynamic descriptor management and richer font handling; these are natural next steps after the basic window + swapchain bring-up.