Faro Engine 0.0.0.b519570 (main)
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
Faro::GraphicsBuffer Class Referenceabstract

A buffer storing graphics related data. Created by GraphicsAdapter::CreateBuffer. More...

#include <GraphicsBuffer.hpp>

Inheritance diagram for Faro::GraphicsBuffer:
Faro::IGraphicsAdapterChild Faro::IObject Faro::GraphicsBufferVK

Public Member Functions

const GraphicsBufferDescGetDesc ()
 Get the description of this buffer.
 
GraphicsBufferType GetBufferType ()
 
void Init (GraphicsAdapter *adapter, GraphicsBufferCreateDesc createDesc)
 
virtual void Upload (uint8 *data)=0
 Prepare the given data so it can be uploaded to the graphics adapter. This buffer must be created as BT_Upload!
 
GraphicsResourceState GetResourceState ()
 Get the current resource state of this buffer.
 
void Init (GraphicsAdapter *adapter)
 Initialize this as a child object for an adapter. Also invokes IObject::Init, derived classes should use that for initialization.
 
GraphicsAdapterGetAdapter ()
 
template<class T >
T * GetTypedAdapter ()
 
virtual void Destroy ()
 Run the destruction logic of this class. This also frees its memory.
 

Protected Member Functions

void SetResourceState (GraphicsResourceState state)
 Set the resource state flag for internal referencing.
 
void Init () override
 Run the initialization logic of this object. Should be overriden by deriving classes.
 

Detailed Description

A buffer storing graphics related data. Created by GraphicsAdapter::CreateBuffer.

Member Function Documentation

◆ Destroy()

void Faro::IObject::Destroy ( )
virtualinherited

Run the destruction logic of this class. This also frees its memory.

Warning
When overriding, the super call must be performed last

Reimplemented in Faro::DataStream, Faro::DataStreamCopy, Faro::GraphicsBufferContainer, Faro::GraphicsSwapchain, Faro::GraphicsBufferVK, Faro::GraphicsCommandListVK, Faro::GraphicsFenceVK, Faro::GraphicsPipelineVK, Faro::GraphicsSemaphoreVK, and Faro::GraphicsSwapchainVK.

◆ GetAdapter()

GraphicsAdapter * Faro::IGraphicsAdapterChild::GetAdapter ( )
inherited

◆ GetBufferType()

GraphicsBufferType Faro::GraphicsBuffer::GetBufferType ( )

◆ GetDesc()

const GraphicsBufferDesc & Faro::GraphicsBuffer::GetDesc ( )

Get the description of this buffer.

Returns
const GraphicsBufferDesc& Buffer description

◆ GetResourceState()

GraphicsResourceState Faro::GraphicsBuffer::GetResourceState ( )

Get the current resource state of this buffer.

Returns
GraphicsResourceState Current resource state

◆ GetTypedAdapter()

template<class T >
T * Faro::IGraphicsAdapterChild::GetTypedAdapter ( )
inlineinherited

◆ Init() [1/3]

void Faro::IGraphicsAdapterChild::Init ( )
overrideprotectedvirtualinherited

Run the initialization logic of this object. Should be overriden by deriving classes.

Reimplemented from Faro::IObject.

◆ Init() [2/3]

void Faro::IGraphicsAdapterChild::Init ( GraphicsAdapter adapter)
inherited

Initialize this as a child object for an adapter. Also invokes IObject::Init, derived classes should use that for initialization.

Parameters
adapterGraphics adapter to initialize this child on.

◆ Init() [3/3]

void Faro::GraphicsBuffer::Init ( GraphicsAdapter adapter,
GraphicsBufferCreateDesc  createDesc 
)

◆ SetResourceState()

void Faro::GraphicsBuffer::SetResourceState ( GraphicsResourceState  state)
protected

Set the resource state flag for internal referencing.

Parameters
stateNew resource state

◆ Upload()

virtual void Faro::GraphicsBuffer::Upload ( uint8 data)
pure virtual

Prepare the given data so it can be uploaded to the graphics adapter. This buffer must be created as BT_Upload!

Parameters
dataPointer to the data to upload

Implemented in Faro::GraphicsBufferVK.


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