Frame is a C++23 3D engine with both Vulkan and OpenGL backends. Backend selection is runtime-configurable, and the sample apps and tests are built from the same engine code.
- Runtime backend switch:
--device=vulkanor--device=opengl - Automatic fallback from Vulkan to OpenGL when Vulkan startup fails
- Scene loading from JSON definitions in
asset/json/ - Model loading (glTF/glb) and texture loading via stb-supported formats
- Sample apps under
examples/and integration tests undertests/frame/
- Git (with submodule support) and Git LFS for binary assets
- CMake 3.21+
- A C++23-capable compiler
- Windows: Visual Studio 2022 (
v143) recommended - Linux: GCC or Clang
- Windows: Visual Studio 2022 (
- Ninja (for Linux presets)
- Vulkan loader/driver installed if running the Vulkan backend
- Linux Wayland development packages when building with the Linux presets
(
libwayland-dev,libxkbcommon-dev,libegl1-mesa-dev, andlibdecor-0-devon Debian-like distributions, orwayland,wayland-protocols,libxkbcommon,mesa, andlibdecorwith Homebrew/Linuxbrew).libdecorgives SDL client-side Wayland decorations, so sample windows keep their title text, FPS updates, and close button.
Clone and initialize external dependencies:
git submodule update --init --recursiveInitialize Git LFS and fetch binary assets:
git lfs install
git lfs pullcmake --preset windows
cmake --build --preset windows-debug
# or
cmake --build --preset windows-releaseThe presets keep vcpkg installs in build/vcpkg_installed/ so fresh configure
directories can reuse the same dependency tree instead of reinstalling packages
per build folder.
cmake --preset linux-debug
cmake --build --preset linux-debug
# or
cmake --preset linux-release
cmake --build --preset linux-releaseThe Linux presets use repository vcpkg overlays for a Wayland-first build. SDL3
is built without its default X11 feature, DBus is built without its default
systemd feature, and the Vulkan loader overlay disables XCB/Xlib WSI support.
On Homebrew/Linuxbrew systems, the triplet discovers the prefix from
HOMEBREW_PREFIX or brew --prefix so vcpkg can find global and formula-local
pkg-config metadata without committing local machine paths.
The samples are built into build/<preset>/bin/.
Windows example:
build/windows/bin/Debug/01_Refraction.exe --device=vulkan
build/windows/bin/Debug/01_Refraction.exe --device=openglLinux example:
./build/linux-debug/bin/01_Refraction --device=vulkan
./build/linux-debug/bin/01_Refraction --device=openglAvailable examples:
00_Cubemap01_Refraction02_Dragon03_SkinnedMesh
Samples accept the following runtime flags. The short -flag=value and Windows
/flag=value forms are normalized to the same options.
| Argument | Values | Default | Description |
|---|---|---|---|
--device |
vulkan, opengl |
vulkan |
Chooses the rendering backend. If Vulkan startup fails, the app falls back to OpenGL. |
--rendering |
auto, raster, raytracing |
auto |
Overrides the render path generated from the level JSON. auto keeps the level default. Aliases include rasterise, rasterize, and raytrace. |
--vk_validation |
true, false |
true in debug, false in release |
Enables Vulkan validation layers when using the Vulkan backend. |
--auto_exit_seconds |
number of seconds | 0.0 |
Exits automatically after the given duration. 0.0 disables auto-exit. |
--screenshot_on_exit |
true, false |
false |
Saves ScreenShot.png before an auto-exit. |
Linux:
cmake --build --preset linux-debug --target FrameTest FrameOpenGLTest FrameVulkanTest
ctest --test-dir build/linux-debug --output-on-failureWindows:
cmake --build --preset windows-debug --target FrameTest FrameOpenGLTest FrameVulkanTest
ctest --test-dir build/windows -C Debug --output-on-failure- Example overview:
examples/README.md - Engine source:
frame/
