Files
cuber/cbt/opengl/context.hpp
T
portersky 22d2bb1c40 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.
2026-05-05 23:37:19 +02:00

22 lines
297 B
C++

#pragma once
#include "cbt/window.hpp"
namespace cbt::opengl {
class context {
public:
explicit context(window const& win);
~context();
auto valid() const -> bool;
private:
bool m_valid = false;
static auto setup_gl() -> bool;
static auto print_info() -> void;
};
}