GLFWFactory.ixx File
Factory functions for creating GLFW-based Application and Window instances. More...
Included Headers
#include <GLFW/glfw3.h>
#include <format>
#include <memory>
#include <string>
#include <helios.ext.opengl.rendering>
#include <helios.window>
#include <helios.input>
#include <helios.event>
#include <helios.app.controller.BasicWindowRenderingController>
#include <helios.ext.glfw.window.GLFWWindowConfig>
#include <helios.ext.glfw.window.GLFWWindowUserPointer>
#include <helios.ext.glfw.input.GLFWInputAdapter>
#include <helios.util.Guid>
#include <helios.event.EventManager>
#include <helios.rendering.material.Material>
#include <helios.ext.glfw.app.GLFWApplication>
#include <helios.ext.glfw.window.GLFWWindow>
#include <helios.rendering.RenderTarget>
Namespaces Index
| namespace | helios |
| namespace | ext |
|
Platform-specific extensions and backend implementations. More... | |
| namespace | glfw |
|
GLFW-specific implementations. More... | |
| namespace | app |
|
GLFW application infrastructure. More... | |
Classes Index
| class | GLFWFactory |
|
Factory class for creating pre-configured GLFW-specific application components. More... | |
Description
Factory functions for creating GLFW-based Application and Window instances.
File Listing
The file content with the documentation metadata removed is:
32export namespace helios::ext::glfw::app {
40 class GLFWFactory {
55 static std::unique_ptr<GLFWApplication> makeOpenGLApp(
74 std::unique_ptr<GLFWApplication> app = std::make_unique<GLFWApplication>(
80 app->init();
81 auto cfg = makeWindowCfg(
90 helios::ext::glfw::window::GLFWWindow& win = app->createWindow(std::move(renderTarget), cfg);
91 app->addController(std::make_unique<helios::app::controller::BasicWindowRenderingController>(win));
94 win.setWindowUserPointer(std::make_unique<helios::ext::glfw::window::GLFWWindowUserPointer>(
95 app.get(),
99 app->setCurrent(win);
101 return std::move(app);
123 auto cfg = helios::ext::glfw::window::GLFWWindowConfig{};
124 cfg.title = std::move(title);
131 static const auto evtGuid = helios::util::Guid::generate();
133 if (const auto* ptr = static_cast<helios::ext::glfw::window::GLFWWindowUserPointer*>(glfwGetWindowUserPointer(nativeWin))) {
140 std::move(event),
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.