Getting Started#

Prerequisites#

  • C++23 and C17 capable compilers

  • CMake 4.1 or newer

  • a Vulkan SDK installation for Vulkan-enabled builds

  • Python plus the packages locked in uv.lock for the docs build (the formatting steps use ANTfrastructure’s separate locked cmake-format project)

  • Rust and cargo: every build links OxidANT’s cxx bridge through Corrosion, --locked to OxidANT’s Cargo.lock, and every build but Debug with OxidANT’s bridge cargo profile (release, but a panic unwinds into an error value); Corrosion runs a cxxbridge on PATH at that lock’s cxx version, or else builds exactly that version into the build tree on the first build. The build stages the bridge’s crate licences and fails when its graph gains a wgpu, naga, winit, egui, tokio, gstreamer or ort package or more than 62 runtime packages (cmake/CargoLicenses.cmake)

  • network access for the first configure, which downloads the default scenes (see below)

Clone the Repository#

git clone --branch develop --recurse-submodules https://github.com/Kataglyphis/BeschleunigerBallett.git
cd BeschleunigerBallett

Configure with CMake Presets#

Use the presets in CMakePresets.json, not ad-hoc build commands:

cmake --list-presets
cmake --preset <preset-name>
cmake --build build --config Debug
ctest --test-dir build --output-on-failure

Visual Studio style generators on Windows need -C Debug or -C Release on ctest.

A bare cmake --build compiles no shaders, and the engine and BuildIntegrity need the SPIR-V. Run bash scripts/linux/compile-slang-shaders.sh (Windows: scripts\windows\Build-SlangShaders.ps1) first, or build through the wrappers below, which compile them for you (which builds do).

BeschleunigerBallett, VulkanEngineCore, the suites and the fuzz targets treat a warning as an error (-Werror, /WX under clang-cl); configure with --compile-no-warning-as-error to try a compiler the image does not ship (warnings).

A host CMake older than 4.1 cannot read CMakePresets.json ("version": 10) and fails cmake --list-presets with Unrecognized "version" field: read the file itself, or the Windows configurations table in AGENTS.md. On Windows, prefer scripts/windows/Build-Windows-Container.ps1, which builds inside a container that already has a new enough CMake. The Windows CI callers check out direct submodules; their build sources are all at that level, so they avoid the nested ANTfrastructure and DocumANTation checkout cycle.

Scenes#

The scenes are not in the repository: Resources/assets.lock pins each one as an AssetANT release archive by URL and SHA-256, and a configure extracts the two the code, the tests and the packages read (crytek-sponza and Dinosaurs, about 33 MB) into Resources/Models through a per-user cache (KATAGLYPHIS_ASSET_CACHE, else %LOCALAPPDATA%\kataglyphis-assets or ~/.cache/kataglyphis-assets). The fetcher is ANTfrastructure’s Python script, so the configure needs Python 3.12 or newer on PATH (python on Windows, python3 elsewhere). The paths the engine loads did not change.

  • -DKATAGLYPHIS_FETCH_ALL_ASSETS=ON fetches every locked scene (all seventeen), for the model picker.

  • cmake -P cmake/FetchAssets.cmake fetches without configuring (add the same -D before -P for all).

  • The skybox comes the same way: Resources/skyboxes.lock pins AssetANT’s CC0 kloofendal_43d_clear_puresky, which every fetch extracts into Resources/Textures/Skybox. Without it the engine draws OxidANT’s procedural sky and logs a warning; KATAGLYPHIS_SKYBOX_DIR=<folder> loads another six faces (RT LF UP DN FT BK.png).

  • Offline, put each archive in the cache as <sha256>-<name>.tar.xz, or configure with -DKATAGLYPHIS_FETCH_ASSETS=OFF and go without the scenes; the tests that read one then skip or fail.

  • Build-Windows-Container.ps1 runs the fetch on the host, so a run from the repository root finds the scenes, and the Windows arm64 lane runs it before its host-side lavapipe suites; both need Python on that host’s PATH. The x64 lane reads the scenes its container’s configure fetched into the bind-mounted workspace, since the windows-2025 runner has no cmake on PATH.

  • The skybox has a lock of its own, so KATAGLYPHIS_FETCH_ALL_ASSETS never puts it in Resources/Models; the packages install it.

How a fetch decides:

  • Each fetched directory holds .assetant-sha256: the archive’s hash and how many files it extracted. Only a stamp matching both makes the fetch a no-op, so a tree whose files went while the ignored stamp stayed is extracted again. A scene directory without a stamp stops the configure instead of being overwritten. The packages leave the stamp out.

  • A changed scene is a new AssetANT release and a new lock line. A published archive never changes: the fetch deletes a download whose hash differs, and stops.

  • AssetANT’s archives are the scenes’ only copy. The history that tracked them was rewritten and LFS stays out; a checkout from before that rewrite follows the hub’s adopt script.

What stays tracked, and the gate that keeps the rest out:

  • The test fixtures in the table below and Resources/Textures/’s three 1-pixel defaults, which the packages install with the rest of Resources/Textures/.

  • Documents/GGD_Kit_milestone_document.pdf (16 MiB, linguist-vendored) and two test fixtures, frozen in large-files.allow for the hub’s large-files gate.

  • The block at the bottom of .gitignore ignores DCC project files, archives and video repo-wide, heavy image formats under Resources/, and Resources/**/*.obj except the five tracked meshes. Every directory under Resources/Models/ but the four fixture directories is ignored, which also keeps the fetched scenes out of git status. Keep that block.

  • A fixture that belongs: git add -f <path>, a ! line in .gitignore and a row in the table below. A scene goes to AssetANT.

  • Do not re-add what was removed as unread or duplicated: Loading_Screen/, the duplicated space skybox, brick.png, dirt.png, a Blender autosave twin, a second dinosaurs.obj and a Doxygen snapshot.

Each fetched scene carries its credit in ATTRIBUTION.txt; AssetANT’s assets/<name>/asset.json records where it came from and how its license was established. Both renderers show the credit in the library row’s tooltip and, once loaded, in About. A glTF’s asset.copyright wins; else the file’s Attribution: and License: lines serve.

Scene

Where

License

crytek-sponza

AssetANT; fetched by default and installed with the packages

CC BY 3.0: © 2010 Frank Meinl, Crytek, after Marko Dabrovic’s Sponza; corrections by Morgan McGuire

Dinosaurs

AssetANT; fetched by default

unknown; the Triceratops mesh is named after joel3d.com

Sulo

AssetANT; KATAGLYPHIS_FETCH_ALL_ASSETS

modelled by Sulo456, published with his permission

Colosseum-gltf, Colosseum-ktx2, Colosseum-web

AssetANT; KATAGLYPHIS_FETCH_ALL_ASSETS, and the docs build fetches Colosseum-web for the WebGPU demo

CC BY 4.0: Colosseum by Sulo456, converted to glTF by AssetANT

the other eleven

AssetANT; KATAGLYPHIS_FETCH_ALL_ASSETS

per scene, in AssetANT’s README

VikingRoom

tracked, a test fixture

CC BY 4.0: “Viking room” by nigelgoh on Sketchfab, the Vulkan Tutorial’s copy with its material renamed

GltfTest, ShadowTest, Plane, plane.obj, suzanne.obj

tracked, test fixtures

—

OxidANT’s crates/assets/tests/assets

the submodule; both renderers’ glTF fixtures, which the C++ tests read in place

OxidANT’s

Running the engine#

BeschleunigerBallett [model] [--adapter=<name>] [--gpu=auto|dedicated|integrated] [--check_resources] [--version] [--help]
  • model: a .gltf, .glb or .obj to start with, ahead of KATAGLYPHIS_MODEL_OVERRIDE and the build’s default scene. A missing or unusable file is logged and the start goes on without it. The status bar says so in amber until the next load. It does the same for missing scenes. A pick or a drop that does not load says why in red, and a load in flight shows its progress.

  • --adapter=<name>: the Vulkan device whose Renderer-tab entry (llvmpipe (LLVM 21.1.8, 256 bits) (Vulkan)) is <name>, else the best-ranked usable one that contains it, ignoring case; KATAGLYPHIS_ADAPTER=<name> does the same, and the flag wins. Two devices with the same entry are ... (Vulkan) #1 and #2, in the order Vulkan lists them. A name no usable device matches is logged and the choice goes on as without it.

  • --gpu: without --adapter, or when it matches nothing, the best usable device of that type, else the best usable one. Automatically a CPU device such as llvmpipe or lavapipe comes last; --adapter can still pick it.

  • The Renderer tab’s ADAPTER section lists every device with its type and, for one the renderer cannot use, what it lacks. Use closes the program and starts it again with the same arguments and --adapter <entry> (before a --), as the Rust viewer does, but after the old one has written its pipeline cache: a start that fails therefore ends the program with an error, where Rust’s stays open.

  • Dropping a .gltf, .glb or .obj on the window replaces the scene; it loads in the background, after a load still running.

  • A source build runs from the repository root, which holds Resources/; an installed one finds its files beside itself.

The Camera tab’s Frame the scene button returns to the scene’s start view. View > Frame scene does the same. The field of view and the fly speed go back too, as in Rust.

The keys follow. One table binds them: Src/shared/frontend/KeyBindings.ixx, the Rust editor’s KEY_BINDINGS row for row. The Camera tab’s CONTROLS list shows it, and BuildIntegrity.GettingStartedListsTheEditorsKeys holds this list to it. The drag and the wheel act over the scene only, with the Rust editor’s speeds:

Key

Does

W A S D

Move forward, back and sideways, at the Camera tab’s Fly speed (units per second)

Q E

Turn left and right

Right mouse

Hold to look around

Left drag

Orbit around the target: a point ahead, as deep as the scene’s centre

Wheel

Zoom in and out, a tenth of the distance per notch

ESC

Leave the focused panel; pressed again, quit

F1

Show or hide the editor

F5

Reload all shaders

F12

Save the scene at 1920x1080, without the editor, as screenshots/screenshot-NNN.png below the working directory

Linux Workflow#

The helper in scripts/linux/ configures, compiles the Slang shaders, then builds:

bash ./scripts/linux/cmake-configure-build.sh \
  --preset linux-debug-clang \
  --build-dir build \
  --build-config Debug

It is made for the family’s Linux CI image, which has the toolchain and the Vulkan SDK. The image’s clang and clang-tidy select the image’s GCC, so nothing passes --gcc-toolchain. sccache runs through the hub’s guarded launcher, which retries once and then compiles directly, since a bare sccache fails every compile once its server is unreachable; the GCC presets use ccache. The commit suite’s heavy files compile one at a time (Ninja pool kataglyphis_heavy_tests), because a GCC unit that imports the renderer holds 5-6 GB; Clang’s stay near 1.3 GB. bash third_party/ANTfrastructure/linux/scripts/run-in-ci-image.sh . -- <command> runs a command there with the checkout mounted at /workspace.

Other helpers: scripts/linux/run-ctest.sh, scripts/linux/build-coverage-gcovr.sh, scripts/linux/build-coverage-llvm.sh, scripts/linux/run-perf-suite.sh, scripts/linux/compare-renderer-pixels.sh (both renderers’ Dinosaurs frames, graded structurally).

Windows Workflow#

Build-Windows.ps1 runs configuration, build, formatting, clang-tidy, tests and packaging from one entry point. Configurations: msvc-debug, msvc-release, clangcl-debug (Debug with ASAN/UBSan), clangcl-profile (RelWithDebInfo with benchmarks), clangcl-release.

ANTfrastructure’s Get-BuildWorkspaceConfig chooses BUILD_WINDOWS_CONFIG and the workspace-root environment override; this driver still validates the selected root with Resolve-WorkspacePath before it computes project-specific build directories.

# single configuration
pwsh -ExecutionPolicy Bypass -File .\scripts\windows\Build-Windows.ps1 -Configurations clangcl-debug

# full sanitizer/profile/release sweep
pwsh -ExecutionPolicy Bypass -File .\scripts\windows\Build-Windows.ps1 `
  -Configurations "clangcl-debug,clangcl-profile,clangcl-release"
  • -TargetArch arm64 cross-builds clangcl-release, clangcl-debug and clangcl-profile (the last only with -SkipPerfTests) for Windows on Arm inside the container image’s arm64 bundle (:winarm64). The Release build writes the portable bundle, MSI, ZIP and MSIX to dist/windows-arm64; .github/workflows/windows-arm64-cross.yml runs that.

  • An x64 build of clangcl-release writes the same to dist/windows-x64, plus the NSIS installer; .github/workflows/windows-x64.yml runs it through scripts/windows/Invoke-WindowsLane.ps1, with the CPU tests, the fuzz seeds and the renderer comparisons.

  • Build-Windows-Container.ps1 passes -SkipMsix, and its default tar transport streams back only logs and the build directories, so dist/ stays in the container. For the packages, push a commit to develop whose message carries [ci windows] (or run windows-x64.yml by hand) and download its BeschleunigerBallett-windows-x64 artifact.

  • The Release package target uses ANTfrastructure’s shared CMake argument builder; -ParallelJobs applies to packaging as well as the ordinary build.

  • Sanitizers apply to Debug builds only; clangcl-debug enables AddressSanitizer and UBSan by default. There is no Windows TSan preset (clang-cl does not support -fsanitize=thread on this target): use linux-debug-tsan-clang or linux-debug-tsan-GNU.

Run helpers, after building:

& ./scripts/windows/Invoke-ClangClDebug.ps1 2>&1 | Tee-Object -FilePath logs/debug/run.log
& ./scripts/windows/Invoke-ClangClRelease.ps1 2>&1 | Tee-Object -FilePath logs/release/run.log

With build dependencies missing on the host, use the container workflow below: the toolchain image ships clang-cl, CMake, Ninja, the Vulkan SDK, Rust and sccache.

Windows Container Workflow (Stevedore)#

The Windows builds also run fully containerized in the ANTfrastructure developer image ghcr.io/kataglyphis/kataglyphis_beschleuniger:winamd64, exactly like CI (.github/workflows/windows-x64.yml). Install Stevedore with winget install stevedore and reboot, then:

# defaults to clangcl-debug,clangcl-profile,clangcl-release
pwsh -ExecutionPolicy Bypass -File .\scripts\windows\Build-Windows-Container.ps1
  • The script always uses Stevedore’s docker.exe; nerdctl is not usable for builds or runs on Windows.

  • Process isolation is the default, so the container sees all host CPUs.

  • By default the sources stream into a reusable container via tar, and the build trees and logs stream back into the working tree; -UseBindMount bind-mounts the repo instead. On a Dev Drive the bind mount needs the container filesystem filters allow-listed once, elevated, then a reboot. The command, its one-quoted-argument trap, verification and revert: third_party/ANTfrastructure/docs/windows-container-build-performance.md. This repo’s measured transport numbers and incremental-build wiring: container-build-caching.md (on this Dev Drive host the tar-pipe measured faster than the bind mount; measure before switching).

  • Builds are supported against the recorded submodule pins; restore them with git submodule update --checkout --recursive. The Windows scripts resolve PowerShell modules from the third_party/ANTfrastructure submodule first, then from this project’s scripts/windows/modules, which holds no copy of an upstream module (see scripts/windows/Resolve-BuildModule.ps1). When bumping third_party/FUZZTEST, keep ABSL_TAG in third_party/CMakeLists.txt >= FuzzTest’s own Abseil pin (see AGENTS.md).

Packaging#

Packaging rules#

  • The Release package step takes its cmake --build --target package arguments from the hub’s Get-CmakeBuildArgs: keep the package target in this repo, not a copied parser.

  • No package ships a build-time file (headers, CMake and pkg-config packages, .lib, .a): check-deb-layout.sh and Build-Windows.ps1’s New-PortableBundle -ForbidBuildTimeFiles apply the hub’s install-tree rule. googletest stays out through INSTALL_GTEST=OFF.

  • The hub’s hardening gates read the shipped binaries. The Linux release job runs verify-elf-hardening.sh on the .deb’s usr/lib/beschleunigerballett/BeschleunigerBallett (PIE, RELRO, BIND_NOW, stack protector, _FORTIFY_SOURCE); Build-Windows.ps1 runs Assert-PeHardening over every .exe and .dll of the portable bundle (ASLR, DEP, high-entropy VA, CFG).

  • Every package installs the third-party licence texts under share/licenses/BeschleunigerBallett/. licenses/third-party-licenses.txt maps each shipped library to its original file; GSL’s and abseil’s come from their FetchContent checkouts. A new linked library or shipped asset needs its row in the same change.

  • The bridge’s crate texts come from the hub’s stage-cargo-licenses.py with OxidANT’s reviewed policy (cmake/CargoLicenses.cmake). Never write a notice for a crate that lacks one: add the original text to OxidANT’s policy.

  • The same call gates the bridge’s crate graph, counted on all five bridge targets. Raise its budget of 62 runtime packages only with a reviewed dependency.

  • Transparent placeholder logos are forbidden for the MSIX.

  • The ARM64 source-copy Pester suite uses the hub’s parsed loop and fixture helpers; keep Ballett’s shader list, mutation and path assertions in this repo.

Linux release packages#

The DEB layout gate requires the complete project LICENSE in /usr/share/licenses/BeschleunigerBallett/, every third-party text listed in licenses/third-party-licenses.txt beside it, GSL’s and abseil’s, and the C++ bridge’s crate texts with their manifest.json (licences). It does not inventory the C and C++ runtime the package carries for older hosts.

bash ./scripts/linux/cmake-configure-build.sh \
  --preset linux-release-clang \
  --build-dir build-release \
  --build-config Release

bash ./scripts/linux/cmake-configure-build.sh \
  --build-dir build-release \
  --skip-configure true \
  --build-target package

The Vulkan SDK environment defaults to the image’s /opt/vulkan/<VULKAN_VERSION>/setup-env.sh, with the version read from ANTfrastructure’s linux/scripts/01-core/versions.env; --vulkan-setup-script points it elsewhere.

Artifacts land in the build directory: a TGZ, a DEB and an AppImage (CPACK_ENABLE_APPIMAGE defaults to ON; -DCPACK_ENABLE_APPIMAGE=OFF skips it). CPack uses a readable appimagetool from PATH, or downloads the release pinned with its SHA256 in ANTfrastructure’s versions.env; a configure that cannot get a verified tool fails instead of silently dropping the AppImage.

Packages include the original Crytek Sponza CC BY 3.0 text and the scene’s source notice beside the installed model; the AssetANT archive remains unchanged.

Windows MSIX#

The MSIX uses images/logo.png for its application tiles and logo assets; the shared packager renders the required sizes. The Windows BeschleunigerBallett executable embeds the project icon via the shared CMake resource helper.

The Windows release workflow can produce an MSIX package. It is signed when a PFX certificate sits at the repository root (the first *.pfx there, gitignored; without one the build warns and the MSIX stays unsigned), with the password from MSIX_PFX_PASSWORD, else MSIX_CERT_PASSWORD. The signing is ANTfrastructure’s Invoke-MsixPackage -Sign -SigningRoot <repo root>.

When MSIX creation is selected, packaging failures are fatal and the shared package verifier reads the completed MSIX to check the project license, the Crytek Sponza CC BY 3.0 text and its provenance notice, every mapped third-party text, GSL’s and abseil’s, and the crate manifest.

CI fetches the certificate over WebDAV instead of committing it: Build-Windows.ps1 -WebDavHostname/-WebDavUsername/-WebDavPassword/-RemoteBasePath (the “Build, test, package (x64)” job of .github/workflows/windows-x64.yml, which passes the WEBDAV_* secrets) drives ANTfrastructure’s windows/scripts/certificates/download_webdav_files.py through the WindowsWebDav.Common module (--extension .pfx). Generating and importing certificates: ANTfrastructure windows/scripts/certificates/README.md.

Shader Include Workflow#

Shaders are written in Slang under Resources/ShadersSlang/. The build scripts compile them to SPIR-V (C++) and WGSL (Rust). Details: shader-build-pipeline.md.

Troubleshooting#

A frame rate held at the display’s refresh is VSync, on by default as in the Rust renderer. The Renderer panel’s DISPLAY switch, or Render > VSync, turns it off: Mailbox where the surface offers it, else Immediate.

Missing Vulkan validation layers fail startup with:

[error] Validation layers requested, but not available!
[error] Failed to create a Vulkan instance!
ERROR: vkGetInstanceProcAddr: Invalid instance

Install the validation packages from your operating system or the Vulkan SDK, then retry. On Linux:

sudo apt install libvulkan1 vulkan-tools vulkan-validationlayers

On Windows, Debug builds abort at startup with exit code -1073740791 (0xC0000409) right after logging Validation layers requested, but not available!. Install the Vulkan SDK (winget install VulkanSDK), or set VK_LAYER_PATH to a directory containing VkLayer_khronos_validation.dll/.json. Profile and Release builds run without validation layers, but still enable VK_EXT_debug_utils where the loader lists it, so a RenderDoc or Nsight capture shows the pass labels and a short name on every object the engine creates on its device (buffers and images, which VMA’s statistics list by the same name, views, samplers, descriptor sets and their layouts and pools, pipelines and their layouts, shader modules, acceleration structures, command pools and buffers, fences, semaphores and query pools); ImGui’s own objects and the instance-level ones (instance, surface, debug messenger) stay unnamed. Running the AddressSanitizer Debug build by hand, keep the ASAN_OPTIONS log_path relative: an absolute C:\... path breaks ASAN option parsing at the drive-letter colon. The Invoke-ClangClDebug.ps1 helper already does this.

In WSL2, a run that shows only llvmpipe (Mesa’s software renderer) is missing the NVIDIA Vulkan ICD. Installing it and restarting WSL (wsl --shutdown), step by step: WSL2 — Vulkan (NVIDIA).