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

#include <GraphicsBufferVK.hpp>

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

Public Member Functions

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

Protected Member Functions

uint32 GetMemoryType ()
 
void SetResourceState (GraphicsResourceState state)
 Set the resource state flag for internal referencing.
 

Protected Attributes

VkDeviceMemory heapMemory = nullptr
 
VkBuffer heapBuffer = nullptr
 
VkImage heapImage = nullptr
 

Member Function Documentation

◆ Destroy()

void Faro::GraphicsBufferVK::Destroy ( )
overridevirtual

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

Warning
When overriding, the super call must be performed last

Reimplemented from Faro::IObject.

◆ GetAdapter()

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

◆ GetBufferType()

GraphicsBufferType Faro::GraphicsBuffer::GetBufferType ( )
inherited

◆ GetDesc()

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

Get the description of this buffer.

Returns
const GraphicsBufferDesc& Buffer description

◆ GetMemoryType()

uint32 Faro::GraphicsBufferVK::GetMemoryType ( )
protected

◆ GetResourceState()

GraphicsResourceState Faro::GraphicsBuffer::GetResourceState ( )
inherited

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::GraphicsBufferVK::Init ( )
overridevirtual

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 
)
inherited

◆ SetResourceState()

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

Set the resource state flag for internal referencing.

Parameters
stateNew resource state

◆ TransitionResource()

void Faro::GraphicsBufferVK::TransitionResource ( VkCommandBuffer  commandBuffer,
GraphicsResourceState  state 
)

◆ Upload()

void Faro::GraphicsBufferVK::Upload ( uint8 data)
overridevirtual

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

Implements Faro::GraphicsBuffer.

Member Data Documentation

◆ heapBuffer

VkBuffer Faro::GraphicsBufferVK::heapBuffer = nullptr
protected

◆ heapImage

VkImage Faro::GraphicsBufferVK::heapImage = nullptr
protected

◆ heapMemory

VkDeviceMemory Faro::GraphicsBufferVK::heapMemory = nullptr
protected

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