VisuTwin Canvas
C++ 3D Engine — Metal Backend
Loading...
Searching...
No Matches
frameGraph.h
Go to the documentation of this file.
1
// SPDX-License-Identifier: Apache-2.0
2
// Copyright 2025-2026 Arnis Lektauers
3
//
4
// Created by Arnis Lektauers on 11.09.2025.
5
//
6
#pragma once
7
8
#include <unordered_map>
9
#include <vector>
10
11
#include "
platform/graphics/renderPass.h
"
12
13
namespace
visutwin::canvas
14
{
15
/*
16
* A frame graph represents a single rendering frame as a sequence of render passes.
17
*/
18
class
FrameGraph
19
{
20
public
:
21
// Reset the frame graph, clearing all render passes
22
void
reset
();
23
24
// Add a render pass to the frame
25
void
addRenderPass
(
const
std::shared_ptr<RenderPass>& renderPass);
26
27
// Compile the frame graph, optimizing render passes
28
void
compile
();
29
30
// Render all passes in the frame graph
31
void
render
(
GraphicsDevice
* device);
32
33
private
:
34
std::vector<std::shared_ptr<RenderPass>> _renderPasses;
35
36
// Map used during frame graph compilation. It maps a render target to its previous occurrence
37
std::unordered_map<RenderTarget*, std::shared_ptr<RenderPass>> _renderTargetMap;
38
};
39
}
visutwin::canvas::FrameGraph
Definition
frameGraph.h:19
visutwin::canvas::FrameGraph::compile
void compile()
Definition
frameGraph.cpp:38
visutwin::canvas::FrameGraph::render
void render(GraphicsDevice *device)
Definition
frameGraph.cpp:153
visutwin::canvas::FrameGraph::addRenderPass
void addRenderPass(const std::shared_ptr< RenderPass > &renderPass)
Definition
frameGraph.cpp:16
visutwin::canvas::FrameGraph::reset
void reset()
Definition
frameGraph.cpp:11
visutwin::canvas::GraphicsDevice
Abstract GPU interface for resource creation, state management, and draw submission.
Definition
graphicsDevice.h:239
visutwin::canvas
Definition
eventHandler.cpp:9
renderPass.h
scene
frameGraph.h
Generated by
1.16.1