5ec8cfc735d608ce3467d37960d448ee7b289d68
Add cbt/gfx layer (pipeline + render_target) inspired by Sokol but C++-friendly with RAII and pipeline_desc. Supports building full graphics pipelines (VS/IA/raster/PS/OM), render-to-texture (FBO), and post-processing steps (scene -> RT -> fullscreen quad with sampler + vignette). - Depth/state/viewport/texture cleanup for reliable scene switching. - Updated cube/sphere to demonstrate (sphere uses RT+post). - Vulkan backend easy via PIMPL in impl (same public API). - Fixed depth test, viewport restore, and state leakage on switch. Followed coding conventions (snake_case, trailing returns, east const, include order, no ; after ns/class, etc.).
cuber
cuber is an OpenGL 3D renderer with multiple scenes.
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
Description
Languages
C++
95.1%
CMake
4.9%