aboutsummaryrefslogtreecommitdiff
path: root/docs/architecture.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/architecture.md')
-rw-r--r--docs/architecture.md23
1 files changed, 17 insertions, 6 deletions
diff --git a/docs/architecture.md b/docs/architecture.md
index 98f2b6f..1e6560b 100644
--- a/docs/architecture.md
+++ b/docs/architecture.md
@@ -313,16 +313,27 @@ a few points worth knowing:
## the build system
-donut uses premake5 to generate gnu makefiles. both backends compile into one
-binary; the choice between them is made at runtime from the saved settings, so
-there is no separate "opengl build" and "vulkan build".
-
-generate and build (arm64 macos):
+donut uses premake5 to generate the build: gnu makefiles on macos
+(`premake5 gmake`) and a visual studio 2022 solution on windows
+(`premake5 vs2022`). both backends compile into one binary; the choice between
+them is made at runtime from the saved settings, so there is no separate "opengl
+build" and "vulkan build". the one exception is windows without the vulkan sdk:
+premake then leaves the vulkan backend out (`DONUT_NO_VULKAN`) and the binary is
+opengl only. on windows `vulkan-1.dll` is delay-loaded, so a vulkan build still
+starts on a machine with no vulkan driver, and any vulkan failure at startup falls
+back to opengl. step-by-step instructions for both platforms are in the
+[readme](../README.md#building).
```bash
-premake5 gmake && make config=debug
+premake5 gmake && make config=debug donut # macos
+premake5 vs2022 # windows, then build donut.sln
```
+the shaders are authored once in slang (`assets/shaders/*.slang`) and compiled by
+`tools/compile-shaders.sh` into `assets/shaders/generated/`: glsl 4.10 for opengl
+and spir-v for vulkan. the generated files are committed, so windows builds use
+them as-is; on macos the script runs as a prebuild step and keeps them current.
+
`premake5 clean` is wired up as a custom action that removes the generated build
output (`bin/`, `bin-int/`, the makefiles) along with the transient runtime files
(`logs/`, `config/`, `imgui.ini`), for a genuine from-scratch reset.