Leo Engine Showcase is a simple launcher for running example demos and games built with Leo Engine. It provides a unified command-line interface so you can list demos, run a specific one, or execute all of them (including a special CI/CD mode for automated builds).
This project is meant to onboard demos quickly: just add a new demo source file, register it in demos.c, and it will automatically appear in the showcase.
- Runs all bundled Leo Engine demos/games from a single entrypoint.
- Command-line interface for selecting demos by index or running them all.
- CI/CD mode (
--cicd) runs each demo for a single frame (useful for automated testing). - Cross-platform build via CMake (macOS, Linux, Windows).
- Dynamically linked against Leo Engine and SDL3.
After building, run the showcase binary:
./leo-engine-showcase [OPTIONS] -h, --help Show this help text and exit
-l, --list-demos List all available demos
-i, --index N Run demo with index N
-a, --all Run all demos sequentially
-c, --cicd Run in CI/CD mode (1 frame only)
List demos:
./leo-engine-showcase --list-demosRun a single demo:
./leo-engine-showcase --index 0Run a demo in CI/CD mode (exit after one frame):
./leo-engine-showcase --index 1 --cicdRun all demos in CI/CD mode:
./leo-engine-showcase --all --cicdThis project uses CMake and fetches Leo Engine automatically as a dependency. A C17-capable compiler and CMake 3.25+ are required.
brew install cmake ninja git
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
cmake --build build --parallel
./build/leo-engine-showcase --list-demossudo apt-get update
sudo apt-get install -y build-essential cmake ninja-build pkg-config git
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
cmake --build build --parallel
./build/leo-engine-showcase --list-demoscmake -S . -B build -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release
.\build\Release\leo-engine-showcase.exe --list-demosIn CI/CD pipelines, the showcase can be run in headless/one-frame mode:
./build/leo-engine-showcase --all --cicdOn Linux, this is typically wrapped in xvfb-run so SDL3 has a virtual display:
xvfb-run -a -s "-screen 0 1280x720x24" ./build/leo-engine-showcase --all --cicdAdding a new demo is as simple as:
- Create
src/demo_yourfeature.cwith abool RunDemo_YourFeature(bool one_frame)function. - Register it in
src/demos.c. - Rebuild — it will show up automatically in
--list-demos.