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.).
Added width/height tracking to the window class via a GLFW
resize callback. The callback stores the current size and
forwards it to a user-provided std::function.
Added context::set_size() to update the GL viewport when
the window is resized.
Changed scene::render() to accept (int width, int height)
parameters so scenes can compute the correct aspect ratio
for their projection matrix instead of hardcoding 1280/720.
Fixed parameter shadowing in resize_callback_impl
(glfw_window instead of window).
Added deps/Findstb.cmake (fetches stb via FetchContent, provides
stb::stb interface target).
Linked to cbt_opengl. Implemented window::screenshot() using
glReadPixels + vertical flip + stb_image_write to save RGBA PNG.
Press S in the app to capture current frame (saved as
screenshot.png). Updated help text.
(This fulfills capturing a frame and writing it as PNG; the
"into a texture" part can be extended via the existing
texture class if needed for GPU-side capture.)
Added `window::stop()` (sets GLFW close flag). Updated
signal/timer handlers and Q key check to call it instead of
using a separate `quit` bool in main().
This encapsulates the close state in the window class (no
more external flag + manual checks). The render loop is now
simpler.
(The process_signals lambda and ASIO duration timer are
retained.)
Extract GLFW window management into a dedicated cbt::window
class (new files in cbt/). The opengl::context now only
handles GLAD setup and context activation (no more window
creation or GLFW init/terminate).
Updated main loop in cuber.cpp, CMakeLists.txt (to build
the new source), and AGENTS.md (docs + source layout).
Addresses the design note in context.cpp about mixing
concerns.
- Create cbt_opengl static library for OpenGL abstraction
- Create cbt_scene static library for base scene class
- Create scenes_cube static library for cube scene
- Move scene base to cbt/ (utility), scenes to root scenes/
- Link libraries in dependency chain: cuber -> scenes -> cbt_scene -> cbt_opengl
- const T* -> T const* in all headers and implementations
- const T& -> T const& for copy constructor/operator= deletes
- update AGENTS.md to document east const convention
- Add shader class for vertex/fragment program compilation
- Add vao class for vertex array object management
- Render RGB gradient triangle with interpolated vertex colors
- Replace window class with cbt::opengl::context
- Add buffer resource (VBO, EBO, UBO, SSBO) with move semantics
- Add texture resource with format/type enums and filtering
- Add descriptor_set for Vulkan-style resource binding
- All resources use RAII with proper cleanup
- Add cbt::window class in cbt/ directory with RAII lifecycle
- Add setup_opengl and info_opengl for glad init and GL info
- Add Q key to quit the application
- Update CMakeLists.txt with glfw3 and glad dependencies
- Update AGENTS.md with snake_case naming and shell conventions