CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::GraphicsRenderTask Class Referenceabstract

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

Inheritance diagram for CeresEngine::GraphicsRenderTask:
CeresEngine::RenderTask CeresEngine::RefCounted< RenderTask > CeresEngine::SimpleGraphicsRenderTask CeresEngine::SimpleGraphicsRenderTask2 CeresEngine::Graphics::UI::UIRenderTask CeresEngine::IBLAmbientLightingRenderTask CeresEngine::SkyboxRenderTask CeresEngine::UnshadedRenderTask CeresEngine::VoxelConeTracing::DebugRenderTask CeresEngine::VoxelConeTracing::IndirectLightingRenderTask CeresEngine::VoxelConeTracing::UpscalingRenderTask CeresEngine::VoxelConeTracing::VoxelizationRenderTask CeresEngine::BasePassRenderTask CeresEngine::BasePassTerrainRenderTask CeresEngine::DepthPrePassRenderTask CeresEngine::FinalCompositingRenderTask CeresEngine::PBRDeferredLightingRenderTask

Public Member Functions

void execute (RenderGraphContext &context, GPUCommandBuffer &commandBuffer) override
 
 RenderTask (RenderGraph &renderGraph)
 
- Public Member Functions inherited from CeresEngine::RenderTask
 RenderTask (RenderGraph &renderGraph)
 
virtual ~RenderTask ()
 
RenderTaskResourceUsagecompile ()
 Compiles the render task.
 
virtual StringView getName () const
 Returns a display name for the render task.
 
virtual RenderTaskStatus check () const
 Returns true if the task is dirty and needs to be run.
 
virtual Any getSettings () const
 Gets a const-reference to the render task settings.
 
virtual Any getSettings ()
 Gets a reference to the render task settings.
 
const Vector< InputSlot * > & getInputs () const
 
const Vector< OutputSlot * > & getOutputs () const
 
const RenderTaskResourceUsagegetResourceUsage () const
 
- Public Member Functions inherited from CeresEngine::RefCounted< RenderTask >
 RefCounted (Args &&... args)
 Creates a new RefCounted object and constructs a new Deleter by forwarding Args to it.
 
void retain () noexcept
 Retains the object by increment it's reference count by one.
 
bool release () noexcept
 Relases the object by decrementing it's reference count by one.
 

Protected Member Functions

virtual void execute (RenderGraphContext &context, GPUCommandBuffer &commandBuffer, GPURenderTarget &renderTarget)=0
 Executes the graphics render task with the given commandBuffer and renderTarget.
 
virtual bool isRenderPassDirty (GPURenderPass &renderPass) const
 Checks if the render pass is dirty and needs to be recreated.
 
virtual GPURenderPassPtr createRenderPass (GPUDevice &device)
 Creates a new render pass instance for the render task.
 
virtual bool isRenderTargetDirty (GPURenderTarget &renderTarget, GPURenderPass &renderPass) const
 Checks if the render target is dirty and needs to be recreated.
 
virtual GPURenderTargetPtr createRenderTarget (GPUDevice &device, GPURenderPass &renderPass)
 Creates a new render target instance for the render task.
 
- Protected Member Functions inherited from CeresEngine::RenderTask
virtual void compile (RenderTaskCompiler &compiler)=0
 Compiles the render task.
 
virtual bool shouldConnect (const Slot &slot, const Slot &targetSlot) const
 An internal method called whenever a new connection is being made.
 
virtual void willConnect (Slot &slot, Slot &targetSlot)
 An internal method called before the slot is connected.
 
virtual void didConnect (Slot &slot, Connection &connection)
 An internal method called after the slot is connected.
 
virtual bool shouldDisconnect (const Slot &slot, const Connection &connection) const
 An internal method called whenever a new disconnection is being made.
 
virtual void willDisconnect (Slot &slot, Connection &connection)
 An internal method called before the slot is disconnected.
 
virtual void didDisconnect (Slot &slot, Connection &connection)
 An internal method called whenever the slot is disconnected.
 
ImageRenderResourcecreate (const GPUImageDescriptor &descriptor)
 
BufferRenderResourcecreate (const GPUBufferDescriptor &descriptor)
 

Protected Attributes

GPURenderPassPtr mRenderPass
 The cached render pass instance.
 
GPURenderTargetPtr mRenderTarget
 The cached render target instance.
 
- Protected Attributes inherited from CeresEngine::RenderTask
RenderTaskResourceUsage mResourceUsage
 

Member Function Documentation

◆ createRenderPass()

virtual GPURenderPassPtr CeresEngine::GraphicsRenderTask::createRenderPass ( GPUDevice device)
protectedvirtual

Creates a new render pass instance for the render task.

Parameters
deviceThe device in which the implementation should create the render pass instance from.

◆ createRenderTarget()

virtual GPURenderTargetPtr CeresEngine::GraphicsRenderTask::createRenderTarget ( GPUDevice device,
GPURenderPass renderPass 
)
protectedvirtual

Creates a new render target instance for the render task.

Parameters
deviceThe device in which the implementation should create the render target instance from.
renderPassA reference to the current render pass. The implementation must use this render pass to create the new render target.

◆ execute() [1/2]

◆ execute() [2/2]

virtual void CeresEngine::GraphicsRenderTask::execute ( RenderGraphContext context,
GPUCommandBuffer commandBuffer,
GPURenderTarget renderTarget 
)
protectedpure virtual

Executes the graphics render task with the given commandBuffer and renderTarget.

Parameters
commandBufferThe command buffer to encode the render task to.
renderTargetThe render target to render to.

Implemented in CeresEngine::SimpleGraphicsRenderTask, CeresEngine::SimpleGraphicsRenderTask2, and CeresEngine::VoxelConeTracing::VoxelizationRenderTask.

◆ isRenderPassDirty()

virtual bool CeresEngine::GraphicsRenderTask::isRenderPassDirty ( GPURenderPass renderPass) const
protectedvirtual

Checks if the render pass is dirty and needs to be recreated.

Parameters
renderPassA reference to the previous render pass. The implementation can use this to compare the existing render pass to check if it needs to recreate it.
Returns
true if the implementation wishes to recreate the render pass.

◆ isRenderTargetDirty()

virtual bool CeresEngine::GraphicsRenderTask::isRenderTargetDirty ( GPURenderTarget renderTarget,
GPURenderPass renderPass 
) const
protectedvirtual

Checks if the render target is dirty and needs to be recreated.

Parameters
renderTargetA reference to the previous render target. The implementation can use this to compare the existing render target to check if it needs to recreate it.
renderPassA reference to the current render pass. The implementation must use this render pass to create the new render target.
Returns
true if the implementation wishes to recreate the render target.

◆ RenderTask()

CeresEngine::RenderTask::RenderTask ( RenderGraph renderGraph)
inlineexplicit

Member Data Documentation

◆ mRenderPass

GPURenderPassPtr CeresEngine::GraphicsRenderTask::mRenderPass
protected

The cached render pass instance.

◆ mRenderTarget

GPURenderTargetPtr CeresEngine::GraphicsRenderTask::mRenderTarget
protected

The cached render target instance.


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