RAII wrappers around every GL resource, a GLCall check on every call,
and thirteen small examples that each isolate one rendering technique.
Small surface area, explicit ownership, no hidden global state beyond the renderer backend.
Programs, buffers, VAOs, textures, cubemaps and framebuffers delete themselves. Copying is deleted, moving is enabled.
Every GL call goes through GLCall, which prints file:line call error code and breaks in Debug builds.
Switch between the real OpenGL backend and a headless Null backend at runtime, with per-frame draw statistics.
Blinn-Phong and Cook-Torrance PBR, shadow maps with PCF, HDR with bloom, skybox and post-processing chains.
From a hardcoded triangle to a procedural rose, each example adds one capability without rewriting the previous one.
Camera math and OBJ import are unit-tested without a GL context, with a coverage floor enforced in CI.
Screenshots captured on macOS / Apple M4 with 4× MSAA.
Requires CMake ≥ 3.16 and a C++17 compiler. GLFW and glm are fetched automatically.
git clone https://github.com/UnmetDecade/Class-OpenGL.git
cd Class-OpenGL
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug
cmake --build build -j
ctest --test-dir build --output-on-failure
./build/13_rose
macOS works out of the box. On Linux install xorg-dev and
libgl1-mesa-dev first. Windows is built with MinGW or MSVC;
see the README for details.
Documentation: README, architecture rules, changelog.