MeshStagingBuffer::AllocateMesh

MeshStagingBuffer::AllocateMesh
bool AllocateMesh(Mesh * pmesh, UPInt vertexCount, UPInt vertexSize, UPInt indexCount);
Description

AllocateMesh allocates buffer space for meshes and initializes it with the mesh. The mesh sizes are also assigned here. 

Batching of meshes allocates space in the staging buffer.

Parameters
Parameters 
Description 
Mesh * pmesh 
Array of mesh data (vertex). 
UPInt vertexCount 
Number of vertices in the mesh. 
UPInt vertexSize 
The size of the vertex arrays. 
UPInt indexCount 
Indices into the vertex arrays. 
Return Value

A Boolean value of true if mesh are added to the buffer and false otherwise. The allocation would fail if the mesh is bigger than the buffer space.