A Vulkan toy renderer, built with C and SDL, currently supporting Windows and Android. 64-bit only.
Features:
- Deferred rendering
- Shadow maps
- Code hotreloading
- Custom GPU memory arena allocator
- Custom model format, includes a converter from gltf files
- Texture Compression (BC7 for Windows and ASTC4x4 for Android) using NVTT
- Debug GUI using Nuklear
Included libraries this project would not have been possible without:
Requirements:
- C11 Compiler (MSYS2 Clang is recommended)
- CMake
- Vulkan SDK
Libraries:
- Create a
libfolder - Vulkan Loader (
vulkan-1.lib)- Copy this from the Vulkan SDK's
libfolder
- Copy this from the Vulkan SDK's
- SDL3
- Download
SDL3-devel-3.2.6-VC.zip - Copy
SDL3.libfromlib\x64
- Download
Building:
- Create build folder:
mkdir build cd build- Put
SDL3.dll(from the SDL3 zip) into thebuildfolder - Run CMake:
cmake .. - Run build:
cmake --build . - Built binary is
playground.exe
Strongly recommended debugging tools:
Requirements:
- Android SDK and NDK
Android only requires SDL3. Download this release ZIP, and put SDL3-3.2.6.aar in android/app/libs/
Other dependencies like the Vulkan loader and shader compiler are included with Android NDK. Running gradlew build will build the APK.
Optional Extras:
- For Vulkan Validation Layers, create a
arm64-v8adirectory inandroid/app/libs/with the khronos validation layer.sofile. The file can be obtained here. - For graphics debugging, RenderDoc also works on Android.
Currently the only tool is the model converter. It requires NVTT, which you can download from here (requires NVIDIA Developer Account.)
To build the tools, follow the steps below:
- copy
lib/x64-v142/nvtt30205.libfrom NVTT install tolib - copy
include/nvtt/nvtt_wrapper.hfrom NVTT install toinclude - copy
nvtt30205.dllfrom NVTT install tobuild - Enable tools building: in
builddirectory, runcmake .. -DBUILD_TOOLS=ON cmake --build .
Using model tool: model <input gltf file> <output model file>
