portersky 6c1096fbb8 refactor: move scenes to dedicated CMakeLists.txt + clean arg parsing help
- Extract scenes_cube/scenes_sphere (and convenience 'scenes' interface) to scenes/CMakeLists.txt.
- Main CMakeLists.txt now much cleaner (single add_subdirectory(scenes)).
- Updated help text in cuber.cpp to clearly separate Flags vs Keys (less confusing 'S' section).
- No behavior change; depth/viewport/state/post-processing fixes from earlier remain.

Followed project conventions and AGENTS.md commit rules.
2026-05-06 00:50:09 +02:00

cuber

cuber is an OpenGL 3D renderer with multiple scenes.

Screenshot of sphere

Requirements

  • CMake 3.21+
  • Ninja
  • C++23 compiler

All dependencies (fmt, GLFW, GLAD, asio, GLM, stb) are fetched automatically via CMake FetchContent.

Development

Configure:

cmake -S . -B build -GNinja

Build:

ninja -C build

Run:

./build/cuber

Usage

--duration <seconds>  Auto-terminate after N seconds (for testing/CI)
--scene <cube|sphere> Select initial scene (default: cube)
--screenshot          Render one frame, save screenshot, and exit
S key                 Take screenshot (saved as screenshot.png)
1/2 key               Switch between cube/sphere scene
Q key                 Quit

Scenes

  • cube — spinning colored cube with per-face colors
  • sphere — cube-to-sphere mapped mesh with per-face colors and diffuse lighting
S
Description
No description provided
Readme 425 KiB
Languages
C++ 95.1%
CMake 4.9%