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 buffers can contain either vertex and/or index data.

Parameters
Parameters 
Description 
Render::MeshCacheItem** pdata 
Pointer to the start of the mesh data cached in the buffer. 
MeshCacheItem::MeshType meshType 
The type of the mesh - regular or complex - to be allocated. 
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 destination format of the generated meshes. 
Return Value

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