CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::TransientImageRenderResource Class Referencefinal

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

Inheritance diagram for CeresEngine::TransientImageRenderResource:
CeresEngine::ImageRenderResource CeresEngine::TRenderResource< GPUImage, GPUImageDescriptor, RenderResourceType::Image > CeresEngine::RenderResource CeresEngine::RefCounted< RenderResource >

Public Member Functions

 TransientImageRenderResource (RenderGraph &renderGraph, const GPUImageDescriptor &descriptor)
 
void realize (GPUDevice &device) final
 Realizes the resource.
 
void unrealize (GPUDevice &device) final
 Unrealizes the resource.
 
GPUImageget () const final
 
const GPUImageDescriptorgetDescriptor () const final
 Gets the resource descriptor.
 
bool isTransient () const final
 
bool isExternal () const final
 
- Public Member Functions inherited from CeresEngine::TRenderResource< GPUImage, GPUImageDescriptor, RenderResourceType::Image >
bool isValid () const override
 
GPUImageoperator* () const
 
GPUImageoperator-> () const
 
 operator GPUImage & () const
 
 operator GPUImage * () const
 
 operator RC< GPUImage > () const
 
 RenderResource (RenderGraph &renderGraph)
 
- Public Member Functions inherited from CeresEngine::RenderResource
 RenderResource (RenderGraph &renderGraph)
 
virtual ~RenderResource ()=default
 
 operator bool () const
 
const Vector< RenderTask * > & getReaders () const
 
const Vector< RenderTask * > & getWriters () const
 
- Public Member Functions inherited from CeresEngine::RefCounted< RenderResource >
 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.
 

Static Public Member Functions

template<typename Processor >
static constexpr void reflect (Processor &&RTTI)
 Executes the given processor for every field of the struct.
 

Private Attributes

GPUImageDescriptor mDescriptor
 
GPUImagePtr mImage = nullptr
 

Additional Inherited Members

- Static Public Attributes inherited from CeresEngine::TRenderResource< GPUImage, GPUImageDescriptor, RenderResourceType::Image >
static const constexpr RenderResourceType resourceType
 
- Protected Attributes inherited from CeresEngine::RenderResource
RenderGraphmRenderGraph
 The owning render graph instance.
 

Constructor & Destructor Documentation

◆ TransientImageRenderResource()

CeresEngine::TransientImageRenderResource::TransientImageRenderResource ( RenderGraph renderGraph,
const GPUImageDescriptor descriptor 
)

Member Function Documentation

◆ get()

GPUImage * CeresEngine::TransientImageRenderResource::get ( ) const
inlinefinalvirtual

◆ getDescriptor()

const GPUImageDescriptor & CeresEngine::TransientImageRenderResource::getDescriptor ( ) const
inlinefinalvirtual

Gets the resource descriptor.

If this resource is transient, returns the descriptor that will be used to create it, if external returns the descriptor for the currently bound resource.

Implements CeresEngine::TRenderResource< GPUImage, GPUImageDescriptor, RenderResourceType::Image >.

◆ isExternal()

bool CeresEngine::TransientImageRenderResource::isExternal ( ) const
inlinefinalvirtual

Returns
true if the resource is external and must be provided externally.

Implements CeresEngine::RenderResource.

◆ isTransient()

bool CeresEngine::TransientImageRenderResource::isTransient ( ) const
inlinefinalvirtual

Returns
true if the resource is transient and will be automatically created by the render graph implementation.

Implements CeresEngine::RenderResource.

◆ realize()

void CeresEngine::TransientImageRenderResource::realize ( GPUDevice device)
finalvirtual

Realizes the resource.

If the resource is a transient resource, it will be created at this stage. Normally, this method is called before executing the first render tasks that uses it.

Parameters
deviceThe device to allocate the resource from.

Implements CeresEngine::RenderResource.

◆ reflect()

template<typename Processor >
static constexpr void CeresEngine::TransientImageRenderResource::reflect ( Processor &&  RTTI)
inlinestaticconstexpr

Executes the given processor for every field of the struct.

Parameters
RTTIThe processor to be ran for every field.

◆ unrealize()

void CeresEngine::TransientImageRenderResource::unrealize ( GPUDevice device)
finalvirtual

Unrealizes the resource.

If the resource is a transient resource, it will be destroyed at this stage. Normally, this method is called after executing the last render tasks that uses it.

Parameters
deviceThe device to allocate the resource from.

Implements CeresEngine::RenderResource.

Member Data Documentation

◆ mDescriptor

GPUImageDescriptor CeresEngine::TransientImageRenderResource::mDescriptor
private

◆ mImage

GPUImagePtr CeresEngine::TransientImageRenderResource::mImage = nullptr
private

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