MeshCache::AllocCacheItem

MeshCache::AllocCacheItem
virtual AllocResult AllocCacheItem(MeshCacheItem** pdata, MeshCacheItem::MeshType meshType, MeshCacheItem::MeshBaseContent & mc, UPInt vertexBufferSize, unsigned vertexCount, unsigned indexCount, bool waitForCache, const VertexFormat* pDestFormat) = 0;
Description

AllocCacheItem allocates back-end specific MeshCacheItem and its buffers. This method is used for PrepareComplexMesh, but also potentially by internal PreparePrimitive.

Parameters
Parameters 
Description 
MeshCacheItem** pdata 
Pointer to the mesh data cached in the buffer// pointer to the start of the buffer holding the cached mesh data. 
MeshCacheItem::MeshType meshType 
The type of the mesh to be allocated (regular or complex). 
MeshCacheItem::MeshBaseContent & mc 
The contents of the mesh. 
UPInt vertexBufferSize 
The size of the vertex buffer. 
unsigned vertexCount 
The number of vertices in the buffer. 
unsigned indexCount 
The indices into the vertex buffer. 
bool waitForCache 
_nt_ 
const VertexFormat* pDestFormat 
The format of the generated meshes. 
Return Value

Returns the flag indicating success/failure in allocating the meshes.