CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::TRenderResource< R, D, RT > Class Template Referenceabstract

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

Inheritance diagram for CeresEngine::TRenderResource< R, D, RT >:
CeresEngine::RenderResource CeresEngine::RefCounted< RenderResource >

Public Member Functions

virtual Rget () const =0
 
virtual const DgetDescriptor () const =0
 Gets the resource descriptor.
 
bool isValid () const override
 
Roperator* () const
 
Roperator-> () const
 
 operator R& () const
 
 operator R* () const
 
 operator RC< R > () const
 
 RenderResource (RenderGraph &renderGraph)
 
- Public Member Functions inherited from CeresEngine::RenderResource
 RenderResource (RenderGraph &renderGraph)
 
virtual ~RenderResource ()=default
 
virtual void realize (GPUDevice &device)=0
 Realizes the resource.
 
virtual void unrealize (GPUDevice &device)=0
 Unrealizes the resource.
 
virtual bool isTransient () const =0
 
virtual bool isExternal () const =0
 
 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 Attributes

static const constexpr RenderResourceType resourceType = RT
 

Additional Inherited Members

- Protected Attributes inherited from CeresEngine::RenderResource
RenderGraphmRenderGraph
 The owning render graph instance.
 

Member Function Documentation

◆ get()

◆ getDescriptor()

virtual const D & CeresEngine::TRenderResource< R, D, RT >::getDescriptor ( ) const
pure virtual

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.

Implemented in CeresEngine::TransientImageRenderResource, CeresEngine::ExternalImageRenderResource, CeresEngine::TransientBufferRenderResource, and CeresEngine::ExternalBufferRenderResource.

◆ isValid()

bool CeresEngine::TRenderResource< R, D, RT >::isValid ( ) const
inlineoverridevirtual

Returns
true if the resource is created and can be used at this moment.

Implements CeresEngine::RenderResource.

◆ operator R&()

Returns
A reference to the renderer resource.

◆ operator R*()

Returns
A pointer to the renderer resource.

◆ operator RC< R >()

CeresEngine::TRenderResource< R, D, RT >::operator RC< R > ( ) const
inline
Returns
A pointer to the renderer resource.

◆ operator*()

R & CeresEngine::TRenderResource< R, D, RT >::operator* ( ) const
inline
Returns
A reference to the renderer resource.

◆ operator->()

R * CeresEngine::TRenderResource< R, D, RT >::operator-> ( ) const
inline
Returns
A pointer to the renderer resource.

◆ RenderResource()

CeresEngine::RenderResource::RenderResource ( RenderGraph renderGraph)
inlineexplicit

Member Data Documentation

◆ resourceType

const constexpr RenderResourceType CeresEngine::TRenderResource< R, D, RT >::resourceType = RT
staticconstexpr

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