refactor: separate window from opengl::context

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.
This commit is contained in:
2026-05-05 23:37:19 +02:00
parent 7a81b30d32
commit 22d2bb1c40
7 changed files with 140 additions and 93 deletions
+1
View File
@@ -20,6 +20,7 @@ find_package(glm REQUIRED)
# OpenGL abstraction library
add_library(cbt_opengl STATIC
"cbt/window.cpp"
"cbt/opengl/context.cpp"
"cbt/opengl/buffer.cpp"
"cbt/opengl/texture.cpp"