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

#include <CeresEngine/RenderAPI/Common.hpp>

Inheritance diagram for CeresEngine::GPUObject:
CeresEngine::GPUDevice CeresEngine::GPUDeviceObject CeresEngine::GLDevice CeresEngine::MKDevice CeresEngine::MTDevice CeresEngine::NLDevice CeresEngine::VKDevice CeresEngine::WGDevice CeresEngine::TDeviceObject< GPUCommandBufferDescriptor > CeresEngine::TDeviceObject< GPUCommandQueueDescriptor > CeresEngine::TDeviceObject< GPUComputePipelineDescriptor > CeresEngine::TDeviceObject< GPUFenceDescriptor > CeresEngine::TDeviceObject< GPUGraphicsPipelineDescriptor > CeresEngine::TDeviceObject< GPUImageViewDescriptor > CeresEngine::TDeviceObject< GPUOcclusionQueryDescriptor > CeresEngine::TDeviceObject< GPUPipelineLayoutDescriptor > CeresEngine::TDeviceObject< GPURenderPassDescriptor > CeresEngine::TDeviceObject< GPURenderTargetDescriptor > CeresEngine::TDeviceObject< GPUResourceSetDescriptor > CeresEngine::TDeviceObject< GPUSamplerDescriptor > CeresEngine::TDeviceObject< GPUShaderDescriptor > CeresEngine::TDeviceObject< GPUShaderProgramDescriptor > CeresEngine::TDeviceObject< GPUSwapchainDescriptor > CeresEngine::TDeviceObject< GPUTimerQueryDescriptor > CeresEngine::GPUResource CeresEngine::TDeviceObject< TDescriptor, TParent >

Public Member Functions

 GPUObject ()=default
 
virtual ~GPUObject ()=default
 
 GPUObject (const GPUObject &)=delete
 
GPUObjectoperator= (const GPUObject &)=delete
 
 GPUObject (GPUObject &&)=delete
 
GPUObjectoperator= (GPUObject &&)=delete
 
void retain () noexcept
 Retains the object by increment it's reference count by one.
 
bool release () noexcept
 Releases the object by decrementing it's reference count by one.
 

Protected Member Functions

virtual void destroy () noexcept
 A internal method called by the system when the object reference count reaches zero.
 

Private Attributes

RefCounter< truemRefCounter
 The object's reference counter.
 

Constructor & Destructor Documentation

◆ GPUObject() [1/3]

CeresEngine::GPUObject::GPUObject ( )
default

◆ ~GPUObject()

virtual CeresEngine::GPUObject::~GPUObject ( )
virtualdefault

◆ GPUObject() [2/3]

CeresEngine::GPUObject::GPUObject ( const GPUObject )
delete

◆ GPUObject() [3/3]

CeresEngine::GPUObject::GPUObject ( GPUObject &&  )
delete

Member Function Documentation

◆ destroy()

virtual void CeresEngine::GPUObject::destroy ( )
protectedvirtualnoexcept

A internal method called by the system when the object reference count reaches zero.

By default, deletes the object, but can be overriden by implementations to override this behavior.

Reimplemented in CeresEngine::VKComputePipeline, CeresEngine::VKGraphicsPipeline, CeresEngine::VKImageView, CeresEngine::VKPipelineLayout, CeresEngine::VKRenderPass, CeresEngine::VKRenderTarget, CeresEngine::VKResourceSet, CeresEngine::VKSampler, CeresEngine::VKShader, and CeresEngine::VKShaderProgram.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

GPUObject & CeresEngine::GPUObject::operator= ( GPUObject &&  )
delete

◆ release()

bool CeresEngine::GPUObject::release ( )
inlinenoexcept

Releases the object by decrementing it's reference count by one.

Returns
true if the object has been destroyed

◆ retain()

void CeresEngine::GPUObject::retain ( )
inlinenoexcept

Retains the object by increment it's reference count by one.

Member Data Documentation

◆ mRefCounter

RefCounter<true> CeresEngine::GPUObject::mRefCounter
private

The object's reference counter.


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