1.6 KiB
1.6 KiB
Build & Environment
-
Prerequisites
- Vulkan SDK installed and
VULKAN_SDKset. - A C++20 compiler and CMake ≥ 3.8.
- GPU drivers with Vulkan 1.2+.
- Vulkan SDK installed and
-
Configure
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug- Re-run configure after toolchain or dependency changes.
-
Build (single-config)
cmake --build build --target vulkan_engine
-
Build (multi-config, e.g., MSVC)
cmake --build build --config Release
-
Run
./bin/vulkan_engine(Linux/macOS)bin/vulkan_engine.exe(Windows)
-
Shaders
- CMake compiles GLSL via
glslangValidatorto SPIR‑V targeting Vulkan 1.2:- Files under
shaders/*.vert|*.frag|*.compare rebuilt oncmake --build.
- Files under
- Windows helper:
./compile_shaders.ps1usesglslcwith--target-env=vulkan1.3and supports additional stages (mesh/task/ray tracing). - Ensure
glslangValidator/glslcis onPATH. Seedocs/SHADERS.md.
- CMake compiles GLSL via
-
Windows SDK note
CMakeLists.txtincludes a default SDK path for Windows1.3.296.0:- Update the path or set
VULKAN_SDKaccordingly if your version differs.
- Update the path or set
-
Third‑party deps
- Vendored under
third_party/and brought in via CMake. Do not edit headers directly; update through targets.
- Vendored under
-
Optional: MikkTSpace tangents
- Enable at configure time:
-DENABLE_MIKKTS=ON(default ON if found). - Requires
third_party/MikkTSpace/mikktspace.candmikktspace.h(provided). - Disable to use the built‑in Gram–Schmidt generator:
-DENABLE_MIKKTS=OFF.
- Enable at configure time:
-
Validation Layers
- Enabled in Debug (
kUseValidationLayers = trueinsrc/core/config.h). - Disable by building Release or toggling the flag during local experimentation.
- Enabled in Debug (