Vertex pool interface. More...
#include <VertexPool.h>
Public Member Functions | |
virtual IBuffer * | Update (Uint32 Index, IRenderDevice *pDevice, IDeviceContext *pContext)=0 |
Updates the internal buffer object at the given index. | |
virtual void | UpdateAll (IRenderDevice *pDevice, IDeviceContext *pContext)=0 |
virtual IBuffer * | GetBuffer (Uint32 Index) const =0 |
virtual void | Allocate (Uint32 NumVertices, IVertexPoolAllocation **ppAllocation)=0 |
Allocates vertices from the pool. | |
virtual void | GetUsageStats (VertexPoolUsageStats &UsageStats)=0 |
Returns the usage stats, see Diligent::VertexPoolUsageStats. | |
virtual Uint32 | GetVersion () const =0 |
virtual const VertexPoolDesc & | GetDesc () const =0 |
Returns the pool description. | |
![]() | |
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 |
Vertex pool interface.
The vertex pool is a collection of dynamic buffers that can be used to store vertex data.
|
pure virtual |
Allocates vertices from the pool.
[in] | NumVertices | - The number of vertices to allocate. |
[out] | ppAllocation | - Memory location where pointer to the new allocation will be stored. |
Returns a pointer to the internal buffer at the given index.
If the internal buffer has not been initialized yet, the method will return null. If the buffer may need to be updated (resized or initialized), use the Update() method.
|
pure virtual |
Returns the internal buffer version. The version is incremented every time any internal buffer is recreated.
|
pure virtual |
Updates the internal buffer object at the given index.
[in] | Index | - The vertex buffer index. Must be in range [0, Desc.NumElements-1]. |
[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.
|
pure virtual |
Updates all internal buffers.