GLFWFactory Class
Factory class for creating pre-configured GLFW-specific application components. More...
Declaration
Public Static Functions Index
| static std::unique_ptr< GLFWApplication > | makeOpenGLApp (std::string title, int width=800, int height=600, int aspectRatioNumer=0, int aspectRatioDenom=0) |
|
Creates a pre-configured GLFWApplication instance for OpenGL rendering. More... | |
| static helios::ext::glfw::window::GLFWWindowConfig | makeWindowCfg (std::string title, int width=800, int height=600, int aspectRatioNumer=0, int aspectRatioDenom=0) |
|
Creates a default `GLFWWindowConfig` with the specific title. More... | |
Description
Factory class for creating pre-configured GLFW-specific application components.
Eases setup of examples and default applications by reducing required boilerplate code.
Definition at line 40 of file GLFWFactory.ixx.
Public Static Functions
makeOpenGLApp()
| inline static |
Creates a pre-configured GLFWApplication instance for OpenGL rendering.
- Parameters
-
title The default title used with the application's main window.
width The width for the main window.
height The height for the main window.
aspectRatioNumer Aspect ratio numerator.
aspectRatioDenom Aspect ratio denominator.
- Returns
A unique_ptr to the newly created GLFWApplication.
Definition at line 55 of file GLFWFactory.ixx.
References makeWindowCfg and helios::ext::glfw::window::GLFWWindow::setWindowUserPointer.
makeWindowCfg()
| inline static |
Creates a default `GLFWWindowConfig` with the specific title.
This method also makes sure that a proper frameBufferSizeCallback is configured, assuming this config is used with a Window created by an application.
- Parameters
-
title The title for the window configuration.
width The width for the main window.
height The height for the main window.
aspectRatioNumer Aspect ratio numerator.
aspectRatioDenom Aspect ratio denominator.
- Returns
A `GLFWWindowConfig` object with default properties like height and width.
Definition at line 119 of file GLFWFactory.ixx.
References helios::util::Guid::generate, helios::event::LATEST_WINS and helios::window::WindowConfig::title.
Referenced by makeOpenGLApp.
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.