Buffer suballocator. More...
#include <BufferSuballocator.h>
Public Member Functions | |
virtual IBuffer * | Update (IRenderDevice *pDevice, IDeviceContext *pContext)=0 |
Updates the internal buffer object. | |
virtual IBuffer * | GetBuffer () const =0 |
Returns a pointer to the internal buffer object. | |
virtual void | Allocate (Uint32 Size, Uint32 Alignment, IBufferSuballocation **ppSuballocation)=0 |
Performs suballocation from the buffer. | |
virtual void | GetUsageStats (BufferSuballocatorUsageStats &UsageStats)=0 |
Returns the suballocator usage stats, see Diligent::BufferSuballocatorUsageStats. | |
virtual Uint32 | GetVersion () const =0 |
Returns the internal buffer version. | |
![]() | |
virtual void DILIGENT_CALL_TYPE | QueryInterface (const INTERFACE_ID &IID, IObject **ppInterface)=0 |
Queries the specific interface. | |
virtual ReferenceCounterValueType DILIGENT_CALL_TYPE | AddRef ()=0 |
Increments the number of strong references by 1. | |
virtual ReferenceCounterValueType DILIGENT_CALL_TYPE | Release ()=0 |
virtual IReferenceCounters *DILIGENT_CALL_TYPE | GetReferenceCounters () const =0 |
Buffer suballocator.
|
pure virtual |
Performs suballocation from the buffer.
[in] | Size | - Suballocation size, in bytes. |
[in] | Alignment | - Required alignment. |
[out] | ppSuballocation | - Memory location where a pointer to the new suballocation will be stored. |
|
pure virtual |
Returns a pointer to the internal buffer object.
If the buffer has not been created yet, the method returns null.
If the buffer may need to be updated, use the Update() method instead.
|
pure virtual |
Returns the internal buffer version.
The version is incremented every time the buffer is expanded.
|
pure virtual |
Updates the internal buffer object.
[in] | pDevice | - A pointer to the render device that will be used to create a new internal buffer, if necessary. |
[in] | pContext | - A pointer to the device context that will be used to copy existing contents to the new buffer, if necessary. |
If the internal buffer needs to be resized, pDevice
and pContext
will be used to create a new buffer and copy existing contents to the new buffer. The method is not thread-safe and an application must externally synchronize the access.