CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
RenderGraph.hpp
Go to the documentation of this file.
1//
2// CeresEngine - A game development framework
3//
4// Created by Rogiel Sulzbach.
5// Copyright (c) 2018-2022 Rogiel Sulzbach. All rights reserved.
6//
7
8#pragma once
9
10#include "Forward.hpp"
11
12#include "RenderGraphBuffer.hpp"
13#include "RenderGraphImage.hpp"
15
18
21
23
24 class RenderGraphProgram;
25
33 class RenderGraph : public Graph {
34 private:
37
38 public:
40 explicit RenderGraph() = default;
41
44
45 public: // Resource Management
48
54
60
65
66 public: // Validation & Compilation
87 };
88
108
109} // namespace CeresEngine::RenderGraph2
A retain-release type of smart pointer.
Definition SmartPtr.hpp:132
Definition Graph.hpp:20
Definition GraphSocket.hpp:46
Definition RenderGraphBuffer.hpp:31
Represents a graph type that can be used for describring the whole rendering process in the engine.
Definition RenderGraph.hpp:33
RenderGraphBuffer & addBuffer(const RenderGraphBufferDescriptor &descriptor, StringView name="")
Adds a new buffer render resource.
RenderGraph()=default
Creates a new RenderGraph instance.
~RenderGraph() noexcept override=default
Destroys RenderGraph instance.
void removeResource(RenderGraphResource &resource)
Removes a resource from the render graph.
Vector< RenderGraphResourcePtr > mResources
A list of resources managed by the graph.
Definition RenderGraph.hpp:36
RenderGraphImage & addImage(const RenderGraphImageDescriptor &descriptor, StringView name="")
Adds a new image render resource.
const Vector< RenderGraphResourcePtr > & getResources() const noexcept
A list of resources managed by the graph.
Definition RenderGraph.hpp:47
SPtr< RenderGraphProgram > compile(GraphSocket &output) const
Compiles the graph into a sequence of commands that is suitable for submitting commands to the GPU.
A RenderGraph resource that represents a GPU image.
Definition RenderGraphImage.hpp:76
Contains a compiled representation of the render graph.
Definition RenderGraph.hpp:96
SPtr< RenderGraph > mRenderGraph
The RenderGraph instance this program was baked from.
Definition RenderGraph.hpp:98
void execute()
Executes the render graph program.
Definition RenderGraphResource.hpp:26
Definition Forward.hpp:12
std::shared_ptr< T > SPtr
SPtr is a smart pointer that retains shared ownership of an object through a pointer.
Definition SmartPtr.hpp:37
std::vector< T, ScopedAllocatorAdaptor< StdAllocator< T, RawAllocator > > > Vector
Vector is a sequence container that encapsulates dynamic size arrays.
Definition Vector.hpp:17
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25
A structure that describes how an Image Resource should be created during Render Graph execution.
Definition RenderGraphImage.hpp:44