SimpleMeshCache

SimpleMeshCache
Declaration
class SimpleMeshCache : public Render::MeshCache;
Description

SimpleMeshCache is a partial mesh cache implementation used to simplify platform-specific MeshCache implementation on consoles. It has the following characteristics: 

- Supports allocation of multiple MeshBuffer blocks, delegating the actual allocation to the createHWBuffer()/destroyHWBuffer() virtual functions which creates and frees SimpleMeshBuffers (h/w buffers) . 

- Handles growth/shrink of the cache. 

- Implements allocBuffer() function that should be used by the PreparePrimitive implementation in the derived class. 

- Uses passed RenderSync object to implement fencing.

Methods
Method 
Description 
Allocates back-end specific MeshCacheItem and its buffers. 
Allocates a number of bytes in the specified buffer, while evicting the least recently used data. 
Locks the buffers (VB/IB) of a MeshCacheItem, returning CPU addressable memory to update them. 
Clears the mesh cache, releasing all dynamically allocated buffers except for the reserve if any. 
Informs cache that the frame rendering has ended. 
Evicts the mesh data items in the buffer and releases the allocator data. 
SimpleMeshCache constructor. 
Returns the rendering synchronization class used for mesh allocation in the buffers. 
Returns the statistics pertaining to mesh cache. 
File

Render_SimpleMeshCache.h