RenderPassFactory.ixx File
Factory for creating LegacyRenderPass objects from scene snapshots. More...
Included Headers
#include <memory>
#include <ostream>
#include <helios.util.log.LogManager>
#include <helios.util.log.Logger>
#include <helios.rendering.shader.UniformValueMap>
#include <helios.rendering.shader.UniformSemantics>
#include <helios.rendering.RenderQueue>
#include <helios.rendering.LegacyRenderPass>
#include <helios.scene.SnapshotItem>
#include <helios.scene.Snapshot>
Namespaces Index
| namespace | helios |
| namespace | rendering |
|
Graphics rendering infrastructure. More... | |
Classes Index
| class | RenderPassFactory |
|
Factory for constructing `LegacyRenderPass` objects from scene snapshots. More... | |
Macro Definitions Index
| #define | HELIOS_LOG_SCOPE "helios::rendering::RenderPassFactory" |
Description
Factory for creating LegacyRenderPass objects from scene snapshots.
Macro Definitions
HELIOS_LOG_SCOPE
|
Definition at line 24 of file RenderPassFactory.ixx.
24#define HELIOS_LOG_SCOPE "helios::rendering::RenderPassFactory"
File Listing
The file content with the documentation metadata removed is:
24#define HELIOS_LOG_SCOPE "helios::rendering::RenderPassFactory"
25export namespace helios::rendering {
61 class RenderPassFactory {
67 inline static const helios::util::log::Logger& logger_ = helios::util::log::LogManager::loggerForScope(
77 static RenderPassFactory& getInstance() {
78 static RenderPassFactory instance;
99 [[nodiscard]] LegacyRenderPass buildRenderPass(const helios::scene::Snapshot& snapshot) const {
101 auto renderQueue = RenderQueue();
103 populateRenderQueue(snapshot, renderQueue);
105 const auto& projectionMatrix = snapshot.projectionMatrix();
106 const auto& viewMatrix = snapshot.viewMatrix();
108 auto frameUniformValues = helios::rendering::shader::UniformValueMap();
109 frameUniformValues.set(helios::rendering::shader::UniformSemantics::ProjectionMatrix, projectionMatrix);
110 frameUniformValues.set(helios::rendering::shader::UniformSemantics::ViewMatrix, viewMatrix);
112 return LegacyRenderPass(
113 &snapshot.viewport(),
131 void populateRenderQueue(
132 const helios::scene::Snapshot& snapshot, helios::rendering::RenderQueue& renderQueue) const {
135 renderQueue.clear();
137 auto snapshotItems = snapshot.snapshotItems();
140 makeRenderCommand(item, renderQueue);
158 void makeRenderCommand(
159 const helios::scene::SnapshotItem& snapshotItem,
160 helios::rendering::RenderQueue& renderQueue) const noexcept {
165 logger_.warn("Renderable no longer available");
169 auto objectUniformValues = helios::rendering::shader::UniformValueMap();
170 auto materialUniformValues = helios::rendering::shader::UniformValueMap();
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.