GLFWPlatformManager Class Template
Concrete manager integrating GLFW with helios runtime/window command flow. More...
Declaration
Public Member Typedefs Index
template < ... > | |
| using | EngineRoleTag = ManagerRole |
|
Engine role marker used by runtime registries. More... | |
Public Constructors Index
template < ... > | |
| GLFWPlatformManager (TRenderPlatform &renderPlatform, PlatformWorld &platformWorld, CommandBufferRegistry &commandBufferRegistry) | |
Public Member Functions Index
template < ... > | |
| void | flush (UpdateContext &updateContext) noexcept |
|
Processes queued platform/window work for the current frame. More... | |
template < ... > | |
| bool | submit (const PollEventsCommand &command) noexcept |
|
Marks that platform events should be polled in the next flush(...). More... | |
template < ... > | |
| bool | submit (const PlatformInitCommand &command) noexcept |
|
Marks platform initialization for execution during the next flush(...). More... | |
template < ... > | |
| bool | submit (const WindowCreateCommand< THandle > &command) noexcept |
|
Queues a window creation request. More... | |
template < ... > | |
| bool | submit (const SwapBuffersCommand< THandle > &command) noexcept |
|
Queues a buffer-swap request for a specific window. More... | |
template < ... > | |
| bool | submit (const WindowResizeCommand< THandle > &command) noexcept |
|
Stores the latest resize request per window entity index. More... | |
template < ... > | |
| bool | submit (const WindowCloseCommand< THandle > &command) noexcept |
|
Queues a window-close request. More... | |
template < ... > | |
| bool | submit (const ShutdownCommand &command) noexcept |
|
Marks platform shutdown for execution during the next flush(...). More... | |
template < ... > | |
| void | init (CommandHandlerRegistry &commandHandlerRegistry) noexcept |
|
Registers this manager as handler for supported platform/window commands. More... | |
Private Member Functions Index
template < ... > | |
| bool | initPlatform (UpdateContext &updateContext) noexcept |
|
Initializes GLFW and transitions runtime/session from booting to boot request. More... | |
template < ... > | |
| bool | createWindow (UpdateContext &updateContext, const WindowCreateCommand< THandle > &cmd) noexcept |
|
Creates a native GLFW window and binds it to the requested window entity. More... | |
template < ... > | |
| void | removeCurrentContext (UpdateContext &updateContext) |
|
Removes CurrentContextComponent from all windows currently marked as active context. More... | |
template < ... > | |
| void | installResizeListener (THandle handle) noexcept |
|
Installs GLFW user-pointer data and renderTarget resize callback for a window. More... | |
template < ... > | |
| void | swapBuffer (UpdateContext &updateContext, const SwapBuffersCommand< THandle > &cmd) noexcept |
|
Executes a single swap-buffers command. More... | |
template < ... > | |
| bool | createWindows (UpdateContext &updateContext) noexcept |
|
Creates all windows queued during command submission. More... | |
template < ... > | |
| void | resizeWindows (UpdateContext &updateContext) noexcept |
|
Applies queued resize commands to window components. More... | |
template < ... > | |
| void | swapBuffers (UpdateContext &updateContext) noexcept |
|
Processes all queued swap-buffers commands. More... | |
template < ... > | |
| void | pollEvents (UpdateContext &updateContext) noexcept |
|
Polls GLFW events if requested by a poll-events command. More... | |
template < ... > | |
| void | closeWindows (UpdateContext &updateContext) noexcept |
|
Destroys all windows queued for closing. More... | |
template < ... > | |
| void | shutdown (UpdateContext &updateContext) noexcept |
|
Terminates GLFW and queues a shutdown state transition request. More... | |
Private Member Attributes Index
template < ... > | |
| std::vector< WindowResizeCommand< THandle > > | pendingResizeCommands_ |
template < ... > | |
| std::vector< WindowCreateCommand< THandle > > | windowCreateCommands_ |
template < ... > | |
| std::vector< SwapBuffersCommand< THandle > > | pendingBufferSwaps_ |
template < ... > | |
| std::vector< WindowCloseCommand< THandle > > | pendingCloseCommands_ |
template < ... > | |
| std::vector< THandle > | currentContexts_ |
template < ... > | |
| bool | shouldInit_ = false |
template < ... > | |
| bool | shouldShutdown_ = false |
template < ... > | |
| bool | pollEvents_ = false |
template < ... > | |
| bool | initialized_ = false |
template < ... > | |
| TRenderPlatform & | renderPlatform_ |
template < ... > | |
| PlatformWorld * | platformWorld_ |
template < ... > | |
| CommandBufferRegistry * | commandBufferRegistry_ = nullptr |
Private Static Attributes Index
template < ... > | |
| static const helios::engine::util::log::Logger & | logger_ = ... |
Description
Concrete manager integrating GLFW with helios runtime/window command flow.
The manager receives runtime and window commands via submit(...), stores them as pending work, and processes them in flush(...) in a deterministic order.
- Template Parameters
-
THandle Window/entity handle type.
TStateCommandBuffer Command buffer used for follow-up state commands.
TPlatformCommandBuffer Command buffer used by GLFW callbacks for platform commands.
Definition at line 99 of file GLFWPlatformManager.ixx.
Public Member Typedefs
EngineRoleTag
|
Engine role marker used by runtime registries.
Definition at line 491 of file GLFWPlatformManager.ixx.
Public Constructors
GLFWPlatformManager()
| inline explicit |
Definition at line 493 of file GLFWPlatformManager.ixx.
Public Member Functions
flush()
| inline noexcept |
Processes queued platform/window work for the current frame.
- Parameters
-
updateContext Frame-local update context.
Definition at line 507 of file GLFWPlatformManager.ixx.
init()
| inline noexcept |
Registers this manager as handler for supported platform/window commands.
- Parameters
-
commandHandlerRegistry Registry used for command-handler registration.
Definition at line 632 of file GLFWPlatformManager.ixx.
submit()
| inline noexcept |
Marks that platform events should be polled in the next flush(...).
- Parameters
-
command Poll-events marker command.
- Returns
true when the command was accepted.
Definition at line 543 of file GLFWPlatformManager.ixx.
submit()
| inline noexcept |
Marks platform initialization for execution during the next flush(...).
- Parameters
-
command Platform-init marker command.
- Returns
true when the command was accepted.
Definition at line 555 of file GLFWPlatformManager.ixx.
submit()
| inline noexcept |
Queues a window creation request.
- Parameters
-
command Window creation command.
- Returns
true when the command was queued.
Definition at line 568 of file GLFWPlatformManager.ixx.
submit()
| inline noexcept |
Queues a buffer-swap request for a specific window.
- Parameters
-
command Swap-buffers command.
- Returns
true when the command was queued.
Definition at line 580 of file GLFWPlatformManager.ixx.
submit()
| inline noexcept |
Stores the latest resize request per window entity index.
- Parameters
-
command Window resize command.
- Returns
true when the command was stored.
Definition at line 592 of file GLFWPlatformManager.ixx.
submit()
| inline noexcept |
Queues a window-close request.
- Parameters
-
command Window-close command.
- Returns
true when the command was queued.
Definition at line 610 of file GLFWPlatformManager.ixx.
submit()
| inline noexcept |
Marks platform shutdown for execution during the next flush(...).
- Parameters
-
command Shutdown marker command.
- Returns
true when the command was accepted.
Definition at line 622 of file GLFWPlatformManager.ixx.
Private Member Functions
closeWindows()
| inline noexcept |
Destroys all windows queued for closing.
- Parameters
-
updateContext Frame-local update context.
Definition at line 436 of file GLFWPlatformManager.ixx.
createWindow()
| inline noexcept |
Creates a native GLFW window and binds it to the requested window entity.
- Parameters
-
updateContext Frame-local update context.
cmd Window creation command containing target handle and config.
- Returns
true if the window was created and bound successfully; otherwise false.
Definition at line 163 of file GLFWPlatformManager.ixx.
createWindows()
| inline noexcept |
Creates all windows queued during command submission.
- Parameters
-
updateContext Frame-local update context.
- Returns
true if at least one window was created in this flush; otherwise false.
Definition at line 345 of file GLFWPlatformManager.ixx.
initPlatform()
| inline noexcept |
Initializes GLFW and transitions runtime/session from booting to boot request.
- Parameters
-
updateContext Frame-local update context.
Definition at line 131 of file GLFWPlatformManager.ixx.
installResizeListener()
| inline noexcept |
Installs GLFW user-pointer data and renderTarget resize callback for a window.
- Parameters
-
handle Window handle for which the listener is installed.
Definition at line 261 of file GLFWPlatformManager.ixx.
pollEvents()
| inline noexcept |
Polls GLFW events if requested by a poll-events command.
- Parameters
-
updateContext Frame-local update context.
Definition at line 422 of file GLFWPlatformManager.ixx.
removeCurrentContext()
| inline |
Removes CurrentContextComponent from all windows currently marked as active context.
- Parameters
-
updateContext Frame-local update context.
Definition at line 242 of file GLFWPlatformManager.ixx.
resizeWindows()
| inline noexcept |
Applies queued resize commands to window components.
Applies queued resize commands to window components. This will also affect the underlying renderTargets, for as long as the specific windows are bound to a renderTarget.
- Parameters
-
updateContext Frame-local update context.
Definition at line 370 of file GLFWPlatformManager.ixx.
shutdown()
| inline noexcept |
Terminates GLFW and queues a shutdown state transition request.
- Parameters
-
updateContext Frame-local update context.
Definition at line 469 of file GLFWPlatformManager.ixx.
swapBuffer()
| inline noexcept |
Executes a single swap-buffers command.
- Parameters
-
updateContext Frame-local update context.
cmd Swap-buffers command.
Definition at line 314 of file GLFWPlatformManager.ixx.
swapBuffers()
| inline noexcept |
Processes all queued swap-buffers commands.
- Parameters
-
updateContext Frame-local update context.
Definition at line 407 of file GLFWPlatformManager.ixx.
Private Member Attributes
commandBufferRegistry_
|
Definition at line 483 of file GLFWPlatformManager.ixx.
currentContexts_
|
Definition at line 109 of file GLFWPlatformManager.ixx.
initialized_
|
Definition at line 117 of file GLFWPlatformManager.ixx.
pendingBufferSwaps_
|
Definition at line 105 of file GLFWPlatformManager.ixx.
pendingCloseCommands_
|
Definition at line 107 of file GLFWPlatformManager.ixx.
pendingResizeCommands_
|
Definition at line 101 of file GLFWPlatformManager.ixx.
platformWorld_
|
Definition at line 124 of file GLFWPlatformManager.ixx.
pollEvents_
|
Definition at line 115 of file GLFWPlatformManager.ixx.
renderPlatform_
|
Definition at line 119 of file GLFWPlatformManager.ixx.
shouldInit_
|
Definition at line 111 of file GLFWPlatformManager.ixx.
shouldShutdown_
|
Definition at line 113 of file GLFWPlatformManager.ixx.
windowCreateCommands_
|
Definition at line 103 of file GLFWPlatformManager.ixx.
Private Static Attributes
logger_
| static |
- Initialiser
-
= helios::engine::util::log::LogManager::loggerForScope( HELIOS_LOG_SCOPE)
Definition at line 121 of file GLFWPlatformManager.ixx.
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.