Class GLFWContext
Defined in File glfw-context.h
Inheritance Relationships
Base Type
public CE::Rendering::OpenGL::Context(Class Context)
Class Documentation
-
class GLFWContext : public CE::Rendering::OpenGL::Context
Declaration:
finalAdapts a display-owned GLFW window to the OpenGL presentation contract.
DisplaySystem owns GLFW and the window; this adapter borrows the window.
Public Functions
-
explicit GLFWContext(::CE::Platform::GLFW::Window &window, int swap_interval = 1)
Borrow a display-owned window and retain the requested presentation interval.
- Parameters:
window – GLFW window kept alive until this adapter and its renderer are destroyed.
swap_interval – Nonnegative refresh-interval request, applied by make_current().
- Throws:
CE::Exceptions::invalid_args – For a negative interval. Construction does not make the context current.
-
virtual void make_current() override
Delegate to the borrowed window’s owner-thread context selection, applying the stored swap interval.
-
virtual void release_current() override
Delegate context release to the borrowed window on its permitted owner; no window destruction occurs.
-
virtual bool is_current() const override
Declaration:
[[nodiscard]]- Returns:
The borrowed window’s current-context observation for this caller; keep the display/window live.
-
virtual ProcAddress proc_address(const char *name) const override
Declaration:
[[nodiscard]]Resolve a native entry point through the borrowed GLFW window.
- Parameters:
name – NUL-terminated name borrowed during the call.
- Returns:
Native address or null as reported by GLFW; use during owner-thread loader initialization.
-
explicit GLFWContext(::CE::Platform::GLFW::Window &window, int swap_interval = 1)