MeshCache::AllocCacheItem

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

AllocCacheItem allocates MeshCache item and its buffers. The index and vertex buffers are allocated separately.

Parameters
Parameters 
Description 
Render::MeshCacheItem** pdata 
Pointer to the mesh data cached in the buffer. 
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 a flag indicating the success/failure in allocating the meshes.