|
CeresEngine 0.2.0
A game development framework
|
#include <CeresEngine/Renderer/RenderGraph/RenderResource.hpp>
Public Member Functions | |
| 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 |
| virtual bool | isValid () 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. | |
Protected Attributes | |
| RenderGraph & | mRenderGraph |
| The owning render graph instance. | |
Private Attributes | |
| Vector< RenderTask * > | mReaders |
| Vector< RenderTask * > | mWriters |
Friends | |
| class | RenderTask |
|
inlineexplicit |
|
virtualdefault |
|
inline |
|
inline |
true if the resource is external and must be provided externally. Implemented in CeresEngine::TransientImageRenderResource, CeresEngine::ExternalImageRenderResource, CeresEngine::TransientBufferRenderResource, and CeresEngine::ExternalBufferRenderResource.
true if the resource is transient and will be automatically created by the render graph implementation. Implemented in CeresEngine::TransientImageRenderResource, CeresEngine::ExternalImageRenderResource, CeresEngine::TransientBufferRenderResource, and CeresEngine::ExternalBufferRenderResource.
true if the resource is created and can be used at this moment. Implemented in CeresEngine::TRenderResource< R, D, RT >, CeresEngine::TRenderResource< GPUBuffer, GPUBufferDescriptor, RenderResourceType::Buffer >, and CeresEngine::TRenderResource< GPUImage, GPUImageDescriptor, RenderResourceType::Image >.
|
inlineexplicit |
true if the resource is created and can be used at this moment. 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.
| device | The device to allocate the resource from. |
Implemented in CeresEngine::TransientImageRenderResource, CeresEngine::ExternalImageRenderResource, CeresEngine::TransientBufferRenderResource, and CeresEngine::ExternalBufferRenderResource.
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.
| device | The device to allocate the resource from. |
Implemented in CeresEngine::TransientImageRenderResource, CeresEngine::ExternalImageRenderResource, CeresEngine::TransientBufferRenderResource, and CeresEngine::ExternalBufferRenderResource.
|
friend |
|
private |
|
protected |
The owning render graph instance.
|
private |