Render a vulkan triangle in ~380 lines of code! (~370 without the shader code)
- Vulkan hpp headers included as a c++ module (c++20 required)
- Vulkan SDK not required (with the exception of MacOS)
- Dynamic rendering (
VK_KHR_dynamic_rendering) - Shader objects (
VK_EXT_shader_object) - Bindless rendering using buffer references (
VK_KHR_buffer_device_address) - (Resizable) BAR for device local buffer access
- Deferred swapchain image allocation (
VK_KHR_swapchain_maintenance1) - Straightforward swapchain sync (
VK_KHR_swapchain_maintenance1) - Modular code
- Slang used for shader code
- SDL3 for window handling
- No Apple specific code thanks to KosmicKrisp
Use CMake for project configuration. The included make.bat script can be used for this. The Vulkan SDK is not required to run this code. Only for validation layers a Vulkan SDK installation is necessary.
Please clone this repository with submodule!
eDeferredMemoryAllocationcan crash the app when apps like RiverTuner are running in the back (deactivated, see line #107)- Visual Studio (Code) still has problems with module syntax highlighting, possible solutions are
- Linux with Clang works (LLVM version >= 18.0.0 + Ninja build version >= 1.11)
- On MacOS use the latest version of LLVM/Clang from brew and install the Vulkan SDK (for KosmicKrisp)