mirror of
https://github.com/johndoe6345789/SDL3CPlusPlus.git
synced 2026-04-24 13:44:58 +00:00
1.8 KiB
1.8 KiB
SDL3CPlusPlus
Minimal SDL3 + Vulkan spinning cube demo.
Cheat sheet
Dependencies
python scripts/dev_commands.py dependenciesinstalls the Conan graph inbuild.
Configure & build
python scripts/dev_commands.py configureruns Ninja with the defaultbuild-ninjadirectory andReleasebuild type; add--generator vsfor the Visual Studio generator or--generator ninja-msvcwhen you want the MSVC-aware Ninja folder.python scripts/dev_commands.py buildtargetsbuild-ninjaby default (change--build-dirif you configured elsewhere).python scripts/dev_commands.py msvc-quickinvokes the VC vars + Ninja one-liner (pass--bat-pathto point at another Visual Studio layout).- Combine
--dry-runwith any subcommand to inspect the alias-driven shell invocation without executing it. python scripts/dev_commands.py runlaunchesspinning_cubefrom the configured Ninja output; pass--build-dirwhen you configured elsewhere.
Run
python scripts/dev_commands.py run [--build-dir ...]to launchspinning_cube; sourcebuild/conanrun.sh/build\\conanrun.batif Conan exports env vars before running the helper.
Runtime configuration
- sdl3_app --json-file-in loads JSON configs (script path, window size, lua_debug, etc.).
- sdl3_app --create-seed-json config/seed_runtime.json writes a starter file assuming scripts/cube_logic.lua sits beside the binary.
- sdl3_app --set-default-json [path] stores or overrides the default runtime JSON; Windows writes %APPDATA%/sdl3cpp, other OSes use $XDG_CONFIG_HOME/sdl3cpp/default_runtime.json (fallback ~/.config/sdl3cpp).
GUI Demo
scripts/gui_demo.lua paints the Lua GUI framework on top of the Vulkan scene. Launch it as ./build/sdl3_app --json-file-in config/gui_runtime.json or register that config via sdl3_app --set-default-json.