RenderQueue Class
Manages collections of render commands for geometry and text. More...
Declaration
Public Constructors Index
| RenderQueue (const RenderQueue &)=delete | |
|
Delete copy constructor. More... | |
| RenderQueue (RenderQueue &&) noexcept=default | |
| RenderQueue () | |
|
Constructs a new empty RenderQueue. More... | |
Public Destructor Index
| ~RenderQueue ()=default | |
Public Operators Index
| RenderQueue & | operator= (const RenderQueue &)=delete |
|
Delete copy assignment operator. More... | |
| RenderQueue & | operator= (RenderQueue &&) noexcept=default |
Public Member Functions Index
| void | add (helios::rendering::mesh::MeshRenderCommand renderCommand) |
|
Adds a `RenderCommand` to this `RenderQueue`. Ownership of the `RenderCommand` is transferred to this `RenderQueue`. More... | |
| void | add (helios::rendering::text::TextRenderCommand renderCommand) |
|
Adds a `TextRenderCommand` to this `RenderQueue`. More... | |
| std::span< const helios::rendering::mesh::MeshRenderCommand > | meshRenderCommands () const noexcept |
|
Returns a const ref to the internal vector of `RenderCommand`. More... | |
| std::span< const helios::rendering::text::TextRenderCommand > | textRenderCommands () const noexcept |
|
Returns a const ref to the internal vector of `TextRenderCommand`. More... | |
| void | clear () |
|
Clears all `RenderCommand` objects from the queue. More... | |
| size_t | meshRenderCommandsSize () const noexcept |
|
Returns the number of `RenderCommand`s this queue contains. More... | |
| size_t | textRenderCommandsSize () const noexcept |
|
Returns the number of `TextRenderCommand`s this queue contains. More... | |
Protected Member Attributes Index
| std::vector< helios::rendering::mesh::MeshRenderCommand > | meshRenderCommands_ |
|
Stores the unique ptrs to the RenderCommand objects of this queue. More... | |
| std::vector< helios::rendering::text::TextRenderCommand > | textRenderCommands_ |
|
Stores text render commands for glyph-based text rendering. More... | |
Protected Static Attributes Index
| static const helios::util::log::Logger & | logger_ = helios::util::log::LogManager::loggerForScope(HELIOS_LOG_SCOPE) |
|
Shared logger instance for all RenderQueue objects. More... | |
Description
Manages collections of render commands for geometry and text.
`RenderQueue` acts as a container for all render commands in a single rendering pass. It manages two separate command lists:
- **RenderCommands:** For geometry rendering (meshes, materials).
- **TextRenderCommands:** For text rendering (glyphs, fonts).
A `RenderQueue` holds unique ownership of geometry render commands and value ownership of text render commands. It can be cleared after processing for reuse in subsequent passes.
## Design
- **Non-copyable, non-movable:** Ensures unique queue identity during processing.
- **Separate command lists:** Allows different rendering strategies for geometry and text.
- See Also
RenderCommand
- See Also
TextRenderCommand
- See Also
Definition at line 46 of file RenderQueue.ixx.
Public Constructors
RenderQueue()
| delete |
Delete copy constructor.
Definition at line 70 of file RenderQueue.ixx.
Reference RenderQueue.
Referenced by operator=, operator=, RenderQueue, RenderQueue and RenderQueue.
RenderQueue()
| noexcept default |
Definition at line 78 of file RenderQueue.ixx.
Reference RenderQueue.
RenderQueue()
| inline |
Constructs a new empty RenderQueue.
Definition at line 86 of file RenderQueue.ixx.
References meshRenderCommands_, RenderQueue and textRenderCommands_.
Public Destructor
~RenderQueue()
| default |
Definition at line 65 of file RenderQueue.ixx.
Public Operators
operator=()
| delete |
Delete copy assignment operator.
Definition at line 75 of file RenderQueue.ixx.
Reference RenderQueue.
operator=()
| noexcept default |
Definition at line 81 of file RenderQueue.ixx.
Reference RenderQueue.
Public Member Functions
add()
| inline |
Adds a `RenderCommand` to this `RenderQueue`. Ownership of the `RenderCommand` is transferred to this `RenderQueue`.
- Parameters
-
renderCommand A unique_ptr to the RenderCommand. This instance takes ownership of the RenderCommand.
- Todo
-
prevent adding renderables while rendering
Definition at line 100 of file RenderQueue.ixx.
Reference meshRenderCommands_.
Referenced by helios::rendering::mesh::MeshRenderable::emit and helios::rendering::text::TextRenderable::emit.
add()
| inline |
Adds a `TextRenderCommand` to this `RenderQueue`.
The command is moved into the queue. Text commands are processed separately from geometry commands during rendering.
- Parameters
-
renderCommand The text render command to add (moved).
Definition at line 112 of file RenderQueue.ixx.
Reference textRenderCommands_.
clear()
| inline |
Clears all `RenderCommand` objects from the queue.
This prepares this queue to be reused in a new rendering pass.
Definition at line 139 of file RenderQueue.ixx.
References meshRenderCommands_ and textRenderCommands_.
Referenced by helios::rendering::RenderPassFactory::populateRenderQueue.
meshRenderCommands()
| inline nodiscard noexcept |
Returns a const ref to the internal vector of `RenderCommand`.
- Returns
A const ref to the list of `RenderCommand`s of this queue.
Definition at line 121 of file RenderQueue.ixx.
Reference meshRenderCommands_.
meshRenderCommandsSize()
| inline nodiscard noexcept |
Returns the number of `RenderCommand`s this queue contains.
- Returns
The number of RenderCommands in this queue.
Definition at line 156 of file RenderQueue.ixx.
Reference meshRenderCommands_.
textRenderCommands()
| inline nodiscard noexcept |
Returns a const ref to the internal vector of `TextRenderCommand`.
- Returns
A const ref to the list of text render commands in this queue.
Definition at line 130 of file RenderQueue.ixx.
Reference textRenderCommands_.
textRenderCommandsSize()
| inline nodiscard noexcept |
Returns the number of `TextRenderCommand`s this queue contains.
- Returns
The number of text render commands in this queue.
Definition at line 165 of file RenderQueue.ixx.
Reference textRenderCommands_.
Protected Member Attributes
meshRenderCommands_
| protected |
Stores the unique ptrs to the RenderCommand objects of this queue.
Definition at line 52 of file RenderQueue.ixx.
Referenced by add, clear, meshRenderCommands, meshRenderCommandsSize and RenderQueue.
textRenderCommands_
| protected |
Stores text render commands for glyph-based text rendering.
Definition at line 57 of file RenderQueue.ixx.
Referenced by add, clear, RenderQueue, textRenderCommands and textRenderCommandsSize.
Protected Static Attributes
logger_
| protected static |
Shared logger instance for all RenderQueue objects.
Definition at line 62 of file RenderQueue.ixx.
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.