Class DisplaySystem
Defined in File display-system.h
Inheritance Relationships
Base Type
public CE::Platform::DisplaySystem(Class DisplaySystem)
Class Documentation
-
class DisplaySystem : public CE::Platform::DisplaySystem
Declaration:
finalOwns a share of GLFW lifetime and all created windows on the platform thread.
Monitor modes/IDs are captured at construction with the primary entry first; there is no hotplug refresh or native-handle rebinding. Keep monitor topology stable while using this inventory. Borrowed windows and monitor references expire at display destruction, after dependent input/context owners retire.
Public Functions
-
Window *create_opengl_window(const ::CE::Platform::Monitor &monitor, ::CE::Platform::WindowMode mode, int width, int height, const std::string &title, const OpenGLContextOptions &context = {})
Declaration:
[[nodiscard]]Borrow a new display-owned OpenGL window using validated positive dimensions, known mode and requested version/profile/visibility.
Foreign monitor IDs, invalid version or native/allocation failures throw. Creation does not activate a rendering window or make the context current.
-
DisplaySystem()
Acquire a shared GLFW library lifetime and capture monitors/modes with primary first.
Native initialization or absent monitors/video modes throws. Construct/destroy on the platform owner; this is not hotplug inventory refresh.
See also
-
inline virtual const std::vector<::CE::Platform::Monitor> &monitors() const override
Declaration:
[[nodiscard]]Borrow captured monitor snapshots with primary first; do not retain past DisplaySystem destruction.
No live topology refresh occurs.
-
inline virtual int monitor_count() const override
Declaration:
[[nodiscard]]Return the captured monitor count, not a fresh native enumeration.
-
inline virtual const ::CE::Platform::Monitor &primary_monitor() const override
Declaration:
[[nodiscard]]Borrow the primary monitor snapshot retained at construction; display must outlive the reference.
-
inline virtual ::CE::Platform::GLFW::Window *active_window() const override
Declaration:
[[nodiscard]]Borrow the initially selected window, null until activate_window().
Successful creation alone does not select it.
-
virtual std::pair<float, float> content_scale(const ::CE::Platform::Monitor &monitor) const override
Declaration:
[[nodiscard]]Query current native X/Y monitor scale by an owned snapshot ID on platform.
Foreign IDs throw invalid_args; captured resolution and window scale are not refreshed.
-
virtual ::CE::Platform::GLFW::Window *create_window(const ::CE::Platform::Monitor &monitor, ::CE::Platform::WindowMode mode, int width, int height) override
Create a display-owned window using current GLFW hints and a generated title; use create_opengl_window() for explicit context hints.
Positive logical dimensions/known mode/owned monitor required; native/allocation failures propagate. The returned pointer borrows display lifetime.
-
::CE::Platform::GLFW::Window *create_window(const ::CE::Platform::Monitor &monitor, ::CE::Platform::WindowMode mode, int width, int height, const std::string &title)
Create a native window with copied title; empty title selects a generated one.
Validation/ownership follows the untitled overload. Creation neither selects an active rendering window nor transfers ownership to the caller.
-
::CE::Platform::GLFW::Window *create_window(const ::CE::Platform::Monitor &monitor, ::CE::Platform::WindowMode mode, ::CE::Platform::GLFW::Resolution resolution)
Create using the supplied logical resolution; delegates to the positive-dimension untitled overload.
-
::CE::Platform::GLFW::Window *create_window(const ::CE::Platform::Monitor &monitor, ::CE::Platform::WindowMode mode)
Create using captured monitor dimensions and a generated title; this is not a fresh native-resolution query.
-
virtual void activate_window(::CE::Platform::Window &window) override
Select the initial display-owned window.
Repeat selection of the same window is accepted; foreign or replacement windows reject. Does not make a context current, switch rendering/resource domains or enable multiple active rendering windows.
-
Window *create_opengl_window(const ::CE::Platform::Monitor &monitor, ::CE::Platform::WindowMode mode, int width, int height, const std::string &title, const OpenGLContextOptions &context = {})