Function CE::Application::GLFWOpenGL::make_context(CE::Input::System&, const Options&)

Function Documentation

std::unique_ptr<CE::Runtime::Context> CE::Application::GLFWOpenGL::make_context(CE::Input::System &input, const Options &config = Options{})

Declaration: [[nodiscard]]

Assemble the GLFW display/window, its OpenGL presentation context, the OpenGL renderer and resource provider, and the selected input adapter.

Assemble owned display/window, OpenGL presentation, renderer/resources and borrowed input.

The default overload owns a dedicated input adapter. The explicit-input overload borrows that adapter; the caller keeps it alive through context teardown. Runtime initialization makes the context current and attaches input before game initialization.

Parameters:
  • input – Adapter retained by the caller through context teardown; construction does not initialize or poll it.

  • config – Window/presentation/execution defaults copied during assembly.

Returns:

Owned runtime Context; initialize it on the platform owner before game initialization. Nonpositive dimensions or negative swap interval throw invalid_args. Display/window/allocation failures clean up completed owned components; no runtime rendering starts here.