Diligent::IBufferSuballocator struct

Buffer suballocator.

Base classes

struct IObject
Base interface for all dynamic objects in the engine.

Derived classes

template<typename Base>
class RefCountedObject
Base class for all reference counting objects.

Public functions

auto GetBuffer(IRenderDevice* pDevice, IDeviceContext* pContext) -> IBuffer* pure virtual
Returns the pointer to the internal buffer object.
void Allocate(Uint32 Size, Uint32 Alignment, IBufferSuballocation** ppSuballocation) pure virtual
Performs suballocation from the buffer.
auto GetFreeSize() -> Uint32 pure virtual
Returns the total remaining free size.
auto GetVersion() const -> Uint32 pure virtual
Returns internal buffer version. The version is incremented every time the buffer is expanded.

Function documentation

IBuffer* Diligent::IBufferSuballocator::GetBuffer(IRenderDevice* pDevice, IDeviceContext* pContext) pure virtual

Returns the pointer to the internal buffer object.

Parameters
pDevice in - Pointer to the render device that will be used to create a new internal buffer, if necessary.
pContext in - Pointer to the device context that will be used to copy existing contents to the new buffer, if necessary.

void Diligent::IBufferSuballocator::Allocate(Uint32 Size, Uint32 Alignment, IBufferSuballocation** ppSuballocation) pure virtual

Performs suballocation from the buffer.

Parameters
Size in - Suballocation size.
Alignment in - Requried alignment.
ppSuballocation out - Memory location where pointer to the new suballocation will be stored.

Uint32 Diligent::IBufferSuballocator::GetFreeSize() pure virtual

Returns the total remaining free size.