Skip to main content

RenderPass Class

Encapsulates a single rendering pass with its associated resources. More...

Declaration

class helios::rendering::RenderPass { ... }

Public Constructors Index

RenderPass (const RenderPass &)=delete

Prevent copying. A RenderPass is not intended to be copied. More...

RenderPass (RenderPass &&) noexcept=default

Allow move. More...

RenderPass (const helios::rendering::Viewport *viewport, helios::rendering::RenderQueue renderQueue, const helios::rendering::shader::UniformValueMap &frameUniformValues) noexcept

Creates a new `RenderPass` with the specified viewport, render queue, and frame uniforms. More...

Public Destructor Index

~RenderPass ()=default

Public Operators Index

RenderPass &operator= (const RenderPass &)=delete

Prevent copy assignment. A RenderPass is not intended to be copied. More...

RenderPass &operator= (RenderPass &&) noexcept=default

Allow move assignment. More...

Public Member Functions Index

const RenderQueue &renderQueue () const noexcept

Returns a const ref to the `RenderQueue` this `RenderPass` holds. More...

const Viewport &viewport () const noexcept

Returns a const ref to the `Viewport` this `RenderPass` holds. More...

voidsetFrameUniformValues (const helios::rendering::shader::UniformValueMap &frameUniformValues) noexcept

Sets the frame-specific uniform values for this pass. More...

const helios::rendering::shader::UniformValueMap &frameUniformValues () const noexcept

Returns a const reference to this `RenderPass`' `UniformValueMap`. More...

Private Member Attributes Index

helios::rendering::RenderQueuerenderQueue_

The `RenderQueue` for this pass, containing all render commands. More...

helios::rendering::shader::UniformValueMapframeUniformValues_

Uniform values specific to the current frame. More...

const helios::rendering::Viewport *viewport_

Non-owning pointer to the `Viewport` processed by this pass. More...

Protected Static Attributes Index

static const helios::util::log::Logger &logger_ = ...

Shared logger instance for all RenderPass objects. More...

Description

Encapsulates a single rendering pass with its associated resources.

A `RenderPass` holds a `RenderQueue` containing all `MeshRenderCommand` and `TextRenderCommand` objects to be processed. It also stores frame-level uniform values (e.g., view and projection matrices) that remain constant during the pass.

## Components

  • **RenderQueue:** Contains geometry and text render commands.
  • **Viewport:** Non-owning pointer to the rendering area and clear settings.
  • **UniformValueMap:** Frame-level uniforms applied to all commands.

## Ownership Model

  • **RenderQueue:** Owned by value (moved into the pass).
  • **UniformValueMap:** Owned by value (copied/moved into the pass).
  • **Viewport:** Non-owning raw pointer. The caller must ensure the viewport remains valid for the lifetime of this pass.

## Lifecycle

``` RenderingDevice::beginRenderPass(pass) → Clear buffers, configure viewport RenderingDevice::doRender(pass) → Process MeshRenderCommands and TextRenderCommands RenderingDevice::endRenderPass(pass) → Finalize pass, unbind resources ```

info

Future versions should support additional configuration like depth testing, stencil operations, and draw modes.

See Also

RenderQueue

See Also

RenderingDevice

See Also

Viewport

See Also

RenderPassFactory

Definition at line 63 of file RenderPass.ixx.

Public Constructors

RenderPass()

helios::rendering::RenderPass::RenderPass (const RenderPass &)
delete

Prevent copying. A RenderPass is not intended to be copied.

Definition at line 101 of file RenderPass.ixx.

Reference RenderPass.

Referenced by operator=, operator=, RenderPass, RenderPass and RenderPass.

RenderPass()

helios::rendering::RenderPass::RenderPass (RenderPass &&)
noexcept default

Allow move.

Definition at line 112 of file RenderPass.ixx.

Reference RenderPass.

RenderPass()

helios::rendering::RenderPass::RenderPass (const helios::rendering::Viewport * viewport, helios::rendering::RenderQueue renderQueue, const helios::rendering::shader::UniformValueMap & frameUniformValues)
inline explicit noexcept

Creates a new `RenderPass` with the specified viewport, render queue, and frame uniforms.

The render queue is moved into this pass. The viewport pointer must remain valid for the lifetime of this pass.

Parameters
viewport

Non-owning pointer to the viewport this RenderPass is processing.

renderQueue

The `RenderQueue` to be processed with this pass (moved).

frameUniformValues

Frame-specific uniform values (e.g., view/projection matrices).

Definition at line 129 of file RenderPass.ixx.

129 explicit RenderPass(
132 const helios::rendering::shader::UniformValueMap& frameUniformValues
133 ) noexcept
134 :
135 viewport_(viewport),
136 renderQueue_(std::move(renderQueue)),
137 frameUniformValues_(frameUniformValues) {
138
139 assert(viewport_ != nullptr && "Unexpected nullptr for viewport in RenderPass constructor");
140 }

References frameUniformValues, RenderPass, renderQueue and viewport.

Public Destructor

~RenderPass()

helios::rendering::RenderPass::~RenderPass ()
default

Definition at line 95 of file RenderPass.ixx.

Public Operators

operator=()

RenderPass & helios::rendering::RenderPass::operator= (const RenderPass &)
delete

Prevent copy assignment. A RenderPass is not intended to be copied.

Definition at line 107 of file RenderPass.ixx.

Reference RenderPass.

operator=()

RenderPass & helios::rendering::RenderPass::operator= (RenderPass &&)
noexcept default

Allow move assignment.

Definition at line 117 of file RenderPass.ixx.

Reference RenderPass.

Public Member Functions

frameUniformValues()

const helios::rendering::shader::UniformValueMap & helios::rendering::RenderPass::frameUniformValues ()
inline nodiscard noexcept

Returns a const reference to this `RenderPass`' `UniformValueMap`.

The map might be empty.

Returns

A const reference to this `RenderPass`' `UniformValueMap` for the current frame.

Definition at line 176 of file RenderPass.ixx.

176 [[nodiscard]] const helios::rendering::shader::UniformValueMap& frameUniformValues() const noexcept {
177 return frameUniformValues_;
178 }

Referenced by RenderPass and setFrameUniformValues.

renderQueue()

const RenderQueue & helios::rendering::RenderPass::renderQueue ()
inline nodiscard noexcept

Returns a const ref to the `RenderQueue` this `RenderPass` holds.

Returns

A const ref to this `RenderPass`' `RenderQueue`.

Definition at line 147 of file RenderPass.ixx.

147 [[nodiscard]] const RenderQueue& renderQueue() const noexcept {
148 return renderQueue_;
149 }

Referenced by RenderPass.

setFrameUniformValues()

void helios::rendering::RenderPass::setFrameUniformValues (const helios::rendering::shader::UniformValueMap & frameUniformValues)
inline noexcept

Sets the frame-specific uniform values for this pass.

Parameters
frameUniformValues

The `UniformValueMap` containing frame-specific uniform values.

Definition at line 165 of file RenderPass.ixx.

Reference frameUniformValues.

viewport()

const Viewport & helios::rendering::RenderPass::viewport ()
inline nodiscard noexcept

Returns a const ref to the `Viewport` this `RenderPass` holds.

Returns

A const ref to this `RenderPass`' `Viewport`.

Definition at line 156 of file RenderPass.ixx.

156 [[nodiscard]] const Viewport& viewport() const noexcept {
157 return *viewport_;
158 }

Referenced by RenderPass.

Private Member Attributes

frameUniformValues_

helios::rendering::shader::UniformValueMap helios::rendering::RenderPass::frameUniformValues_

Uniform values specific to the current frame.

This map contains uniforms that change once per frame, such as the view and the projection matrices.

Definition at line 77 of file RenderPass.ixx.

renderQueue_

helios::rendering::RenderQueue helios::rendering::RenderPass::renderQueue_

The `RenderQueue` for this pass, containing all render commands.

Definition at line 69 of file RenderPass.ixx.

viewport_

const helios::rendering::Viewport* helios::rendering::RenderPass::viewport_

Non-owning pointer to the `Viewport` processed by this pass.

The caller must ensure the viewport remains valid for the lifetime of this pass.

Definition at line 84 of file RenderPass.ixx.

84 const helios::rendering::Viewport* viewport_;

Protected Static Attributes

logger_

const helios::util::log::Logger& helios::rendering::RenderPass::logger_
protected static

Shared logger instance for all RenderPass objects.

Initialiser

Definition at line 90 of file RenderPass.ixx.


The documentation for this class was generated from the following file:


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.