Files
cuber/cbt/opengl/context.hpp
T
portersky b6adb7c23a style: move public members first in class declarations
- Reorder all class headers to put public interface before private members
- Document convention in AGENTS.md
2026-05-05 22:30:56 +02:00

32 lines
615 B
C++

#pragma once
#include <string>
#define GLFW_INCLUDE_NONE
#include "GLFW/glfw3.h"
namespace cbt::opengl {
class context {
public:
explicit context(std::string title, int width, int height);
~context();
auto should_close() const -> bool;
auto valid() const -> bool;
auto swap_buffers() -> void;
auto poll_events() -> void;
auto raw() const -> GLFWwindow*;
private:
GLFWwindow* m_window = nullptr;
bool m_initialized = false;
static auto init() -> bool;
static auto terminate() -> void;
static auto setup_gl() -> bool;
static auto print_info() -> void;
};
}