CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::RenderGraph Class Reference

#include <CeresEngine/Renderer/RenderGraph/RenderGraph.hpp>

Classes

struct  Step
 

Public Member Functions

 RenderGraph ()
 
 RenderGraph (const RenderGraph &)=delete
 
RenderGraphoperator= (const RenderGraph &)=delete
 
 ~RenderGraph ()
 
template<typename T , typename... Args>
TaddTask (Args &&... args)
 Adds a new task by creating a task of type T with by passing the given args to it's constructor.
 
ImageRenderResourcecreateResource (const GPUImageDescriptor &descriptor)
 Creates a new transient image resource using the given descriptor.
 
ImageRenderResourcecreateResource (GPUImage &image)
 Creates a new external image resource using the given image.
 
BufferRenderResourcecreateResource (const GPUBufferDescriptor &descriptor)
 Creates a new transient buffer resource using the given descriptor.
 
BufferRenderResourcecreateResource (GPUBuffer &buffer)
 Creates a new external buffer resource using the given buffer.
 
template<typename T , typename... Args>
TcreateResource (Args &&... args)
 Creates a new resource type of a custom type.
 
void compile ()
 
void compile2 ()
 
void execute (Renderer &renderer, GPUDevice &device)
 
void reset ()
 

Private Member Functions

template<typename T , typename... Args>
Tallocate (Args &&... args)
 
template<typename T >
void deallocate (T *ptr)
 

Private Attributes

RenderGraphAllocator mAllocator
 
RenderGraphVector< RenderResourcePtrmResources
 
RenderGraphVector< RenderTaskPtrmTasks
 
RenderGraphVector< StepmTimeline
 

Friends

class RenderResource
 

Constructor & Destructor Documentation

◆ RenderGraph() [1/2]

CeresEngine::RenderGraph::RenderGraph ( )

◆ RenderGraph() [2/2]

CeresEngine::RenderGraph::RenderGraph ( const RenderGraph )
delete

◆ ~RenderGraph()

CeresEngine::RenderGraph::~RenderGraph ( )

Member Function Documentation

◆ addTask()

template<typename T , typename... Args>
T & CeresEngine::RenderGraph::addTask ( Args &&...  args)
inline

Adds a new task by creating a task of type T with by passing the given args to it's constructor.

Template Parameters
TThe task class type.
ArgsThe task constructor argument types.
Parameters
argsThe task constructor arguments.
Returns
A reference to the newly created task.

◆ allocate()

template<typename T , typename... Args>
T * CeresEngine::RenderGraph::allocate ( Args &&...  args)
inlineprivate

◆ compile()

void CeresEngine::RenderGraph::compile ( )

◆ compile2()

void CeresEngine::RenderGraph::compile2 ( )

◆ createResource() [1/5]

template<typename T , typename... Args>
T & CeresEngine::RenderGraph::createResource ( Args &&...  args)
inline

Creates a new resource type of a custom type.

Template Parameters
TThe resource class type.
ArgsThe resource constructor argument types.
Parameters
argsThe resource constructor arguments.
Returns
A reference to the newly created resource object.

◆ createResource() [2/5]

BufferRenderResource & CeresEngine::RenderGraph::createResource ( const GPUBufferDescriptor descriptor)

Creates a new transient buffer resource using the given descriptor.

Parameters
descriptorA descriptor structure that defines how the buffer should be created.
Returns
A reference to the created transient buffer resource.

◆ createResource() [3/5]

ImageRenderResource & CeresEngine::RenderGraph::createResource ( const GPUImageDescriptor descriptor)

Creates a new transient image resource using the given descriptor.

Parameters
descriptorA descriptor structure that defines how the image should be created.
Returns
A reference to the created transient image resource.

◆ createResource() [4/5]

BufferRenderResource & CeresEngine::RenderGraph::createResource ( GPUBuffer buffer)

Creates a new external buffer resource using the given buffer.

Parameters
bufferThe existing external buffer to create the new resource from.
Returns
A reference to the created external buffer resource.

◆ createResource() [5/5]

ImageRenderResource & CeresEngine::RenderGraph::createResource ( GPUImage image)

Creates a new external image resource using the given image.

Parameters
imageThe existing external image to create the new resource from.
Returns
A reference to the created external image resource.

◆ deallocate()

template<typename T >
void CeresEngine::RenderGraph::deallocate ( T ptr)
inlineprivate

◆ execute()

void CeresEngine::RenderGraph::execute ( Renderer renderer,
GPUDevice device 
)

◆ operator=()

RenderGraph & CeresEngine::RenderGraph::operator= ( const RenderGraph )
delete

◆ reset()

void CeresEngine::RenderGraph::reset ( )

Friends And Related Symbol Documentation

◆ RenderResource

Member Data Documentation

◆ mAllocator

RenderGraphAllocator CeresEngine::RenderGraph::mAllocator
private

◆ mResources

RenderGraphVector<RenderResourcePtr> CeresEngine::RenderGraph::mResources
private

◆ mTasks

RenderGraphVector<RenderTaskPtr> CeresEngine::RenderGraph::mTasks
private

◆ mTimeline

RenderGraphVector<Step> CeresEngine::RenderGraph::mTimeline
private

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