MeshCache::PreparePrimitive

MeshCache::PreparePrimitive
virtual bool PreparePrimitive(HAL* hal, PrimitiveBatch* pbatch, MeshCacheItem::MeshContent & mc, bool waitForCache);
Description

PreparePrimitive generates meshes and uploads them to buffers. Returns 'false' if there is not enough space in Cache, so Unlock and flush needs to take place.

Parameters
Parameters 
Description 
HAL* hal 
The render HAL for accessing the renderer. 
PrimitiveBatch* pbatch 
Pointer to the PrimitiveBatch containing a set of consecutive meshes. 
MeshCacheItem::MeshContent & mc 
The mesh data. 
bool waitForCache 
Pass 'false' for firstCall if PreparePrimitive was already called once with this data and failed. 
Return Value

A Boolean value of true for successful mesh generation and false otherwise.