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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user