Skip to main content

SceneRenderingSystem Class

Renders scenes through their configured viewports. More...

Declaration

class helios::engine::modules::scene::systems::SceneRenderingSystem { ... }

Public Member Typedefs Index

usingEngineRoleTag = helios::engine::common::tags::SystemRole

Public Constructors Index

SceneRenderingSystem (helios::rendering::RenderingDevice &renderingDevice, helios::engine::modules::scene::types::SceneToViewportMap &sceneToViewportMap)

Constructs the system with required dependencies. More...

Public Member Functions Index

voidupdate (helios::engine::runtime::world::UpdateContext &updateContext) noexcept

Renders all active viewports for this frame. More...

Private Member Attributes Index

helios::rendering::RenderingDevice &renderingDevice_

Reference to the rendering device for draw call submission. More...

helios::engine::modules::scene::types::SceneToViewportMap &sceneToViewportMap_

Reference to the scene-to-viewport mapping. More...

Description

Renders scenes through their configured viewports.

This system iterates over all active viewport IDs from the session, resolves the associated scene and viewport via SceneToViewportMap, creates a scene snapshot, and submits it to the rendering device.

The system runs in the Post phase after all gameplay updates are complete, ensuring the scene graph reflects the final state for this frame.

See Also

SceneToViewportMap

See Also

RenderingDevice

See Also

RenderPassFactory

Definition at line 52 of file SceneRenderingSystem.ixx.

Public Member Typedefs

EngineRoleTag

using helios::engine::modules::scene::systems::SceneRenderingSystem::EngineRoleTag = helios::engine::common::tags::SystemRole

Public Constructors

SceneRenderingSystem()

helios::engine::modules::scene::systems::SceneRenderingSystem::SceneRenderingSystem (helios::rendering::RenderingDevice & renderingDevice, helios::engine::modules::scene::types::SceneToViewportMap & sceneToViewportMap)
inline explicit

Constructs the system with required dependencies.

Parameters
renderingDevice

The rendering device for submitting draw calls.

sceneToViewportMap

Mapping from scenes to their viewports.

Definition at line 74 of file SceneRenderingSystem.ixx.

77 )
78 : renderingDevice_(renderingDevice), sceneToViewportMap_(sceneToViewportMap) {}

Public Member Functions

update()

void helios::engine::modules::scene::systems::SceneRenderingSystem::update (helios::engine::runtime::world::UpdateContext & updateContext)
inline noexcept

Renders all active viewports for this frame.

Iterates over the session's active viewport IDs, resolves each to its scene and viewport, creates a snapshot, builds a RenderPass, and submits it to the rendering device.

Parameters
updateContext

The current frame's update context.

Definition at line 89 of file SceneRenderingSystem.ixx.

90
91
92 auto& session = updateContext.session();
93
94 auto viewportIds = session.viewportIds();
95
96 for (auto viewportId : viewportIds) {
97
98 auto scene = sceneToViewportMap_.scene(viewportId);
99 if (!scene) {
100 continue;
101 }
102
103 auto viewport = sceneToViewportMap_.viewport(scene->sceneId(), viewportId);
104 if (!viewport) {
105 continue;
106 }
107
108 const auto& snapshot = scene->createSnapshot(*viewport);
109 if (snapshot.has_value()) {
111 .buildRenderPass(*snapshot);
112 renderingDevice_.render(renderPass);
113 }
114
115 }
116
117 }

References helios::rendering::RenderPassFactory::buildRenderPass and helios::rendering::RenderPassFactory::getInstance.

Private Member Attributes

renderingDevice_

helios::rendering::RenderingDevice& helios::engine::modules::scene::systems::SceneRenderingSystem::renderingDevice_

Reference to the rendering device for draw call submission.

Definition at line 57 of file SceneRenderingSystem.ixx.

sceneToViewportMap_

helios::engine::modules::scene::types::SceneToViewportMap& helios::engine::modules::scene::systems::SceneRenderingSystem::sceneToViewportMap_

Reference to the scene-to-viewport mapping.

Definition at line 62 of file SceneRenderingSystem.ixx.


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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.