class DynamicBufferPool

File location: framework/cauldron/framework/inc/render/dynamicbufferpool.h

Methods

Return type

Description

static DynamicBufferPool*

DynamicBufferPool instance creation function. Implemented per api/platform to return the correct internal resource type.

BufferAddressInfo

AllocConstantBuffer (uint32_t size, const void* pInitData) = 0
Allocates a temporary constant buffer and initializes it with the provided memory. Returns the BufferAddressInfo for the buffer.

void

BatchAllocateConstantBuffer ( uint32_t size, uint32_t count, BufferAddressInfo * pBufferAddressInfos ) = 0
Allocates a batch of temporary constant buffers without initializing. Sets the BufferAddressInfo for the buffers at the location specified in pBufferAddressInfos.

void

InitializeConstantBuffer ( const BufferAddressInfo & bufferAddressInfo, uint32_t size, const void* pInitData ) = 0

BufferAddressInfo

AllocVertexBuffer (uint32_t vertexCount, uint32_t vertexStride, void** pBuffer) = 0
Allocates a temporary vertex buffer and maps the provided pointer to the backing memory. Returns the BufferAddressInfo for the buffer.

BufferAddressInfo

AllocIndexBuffer (uint32_t indexCount, uint32_t indexStride, void** pBuffer) = 0
Allocates a temporary index buffer and maps the provided pointer to the backing memory. Returns the BufferAddressInfo for the buffer.

const GPUResource *

GetResource () const
Gets a constant pointer to the buffer pool’s underlaying “GPUResource“.

void

EndFrame () = 0
Cycles used memory thus far in preparation for next batch of use.

Detailed description

Methods

CreateDynamicBufferPool

Copied!

static DynamicBufferPool* CreateDynamicBufferPool ()

DynamicBufferPool instance creation function. Implemented per api/platform to return the correct internal resource type.


AllocConstantBuffer

Copied!

virtual BufferAddressInfo  AllocConstantBuffer (
    uint32_t size,
    const void* pInitData
) = 0

Allocates a temporary constant buffer and initializes it with the provided memory. Returns the BufferAddressInfo for the buffer.


BatchAllocateConstantBuffer

Copied!

virtual void BatchAllocateConstantBuffer (
    uint32_t size,
    uint32_t count,
    BufferAddressInfo * pBufferAddressInfos
) = 0

Allocates a batch of temporary constant buffers without initializing. Sets the BufferAddressInfo for the buffers at the location specified in pBufferAddressInfos.


AllocVertexBuffer

Copied!

virtual BufferAddressInfo  AllocVertexBuffer (
    uint32_t vertexCount,
    uint32_t vertexStride,
    void** pBuffer
) = 0

Allocates a temporary vertex buffer and maps the provided pointer to the backing memory. Returns the BufferAddressInfo for the buffer.


AllocIndexBuffer

Copied!

virtual BufferAddressInfo  AllocIndexBuffer (
    uint32_t indexCount,
    uint32_t indexStride,
    void** pBuffer
) = 0

Allocates a temporary index buffer and maps the provided pointer to the backing memory. Returns the BufferAddressInfo for the buffer.


GetResource

Copied!

const GPUResource * GetResource () const

Gets a constant pointer to the buffer pool’s underlaying GPUResource.


EndFrame

Copied!

virtual void EndFrame () = 0

Cycles used memory thus far in preparation for next batch of use.