#include <OgreVertexShadowMapHelper.h>
|  | 
| static bool | findFirstAppearance (const VertexArrayObjectArray &vao, const VertexBufferPacked *vertexBuffer, size_t &outVaoIdx, size_t &outVertexBufferIdx) | 
|  | Finds the first occurence of 'vertexBuffer' pointer in vao, and returns its indexes so that vao[outVaoIdx].getVertexBuffers()[outVertexBufferIdx] is the found first occurrence. 
 | 
|  | 
| static void | optimizeForShadowMapping (VaoManager *vaoManager, const VertexArrayObjectArray &inVao, VertexArrayObjectArray &outVao) | 
|  | Reads all the vertex & index buffer from all the LOD levels in inVao, optimizes the buffers for shadow mapping, and stores them as new Vaos in outVao. 
 | 
|  | 
| static uint32 | shrinkVertexBuffer (uint8 *dstData, const VertexElement2 *vertexElements[3], FastArray< uint32 > &vertexConversionLut, bool hasIndexBuffer, const uint8 *srcData[3], const size_t srcOffset[3], const size_t srcBytesPerVertex[3], uint32 numVertices) | 
|  | Copies the contents from srcData into dstData, but shrinking it by removing duplicated vertices. 
 | 
|  | 
| static void | useSameVaos (VaoManager *vaoManager, const VertexArrayObjectArray &inVao, VertexArrayObjectArray &outVao) | 
|  | Copies all the pointers in inVao to outVao so they are identical without cloning any memory. 
 | 
|  | 
◆ findFirstAppearance()
Finds the first occurence of 'vertexBuffer' pointer in vao, and returns its indexes so that vao[outVaoIdx].getVertexBuffers()[outVertexBufferIdx] is the found first occurrence. 
- Parameters
- 
  
    | vao | Vao to look inside. |  | vertexBuffer | Vertex Buffer to look for. |  | outVaoIdx | The index to vao[outVaoIdx]. Value is not set if not found. |  | outVertexBufferIdx | The index to vao[outVaoIdx].getVertexBuffers[outVertexBufferIdx]. Value is not set if not found. |  
 
- Returns
- True if found, false if not found. 
 
 
◆ optimizeForShadowMapping()
Reads all the vertex & index buffer from all the LOD levels in inVao, optimizes the buffers for shadow mapping, and stores them as new Vaos in outVao. 
- Parameters
- 
  
    | vaoManager | VaoManager. Required for buffer management. |  | inVao | Input Vao to clone and optimize. |  | outVao | Output vao to store the cloned, optimized version. |  
 
 
 
◆ shrinkVertexBuffer()
Copies the contents from srcData into dstData, but shrinking it by removing duplicated vertices. 
Duplicated vertices are not removed if there is not index buffer. 
- Parameters
- 
  
    | dstData | [inout] Pointer to copy to. Must be numVertices * sum(vertexElements[i]) in size, although amount of written bytes may be lower if there were duplicate vertices. |  | vertexElements | [in] An array with the vertex elements that needs to be copied (i.e. VES_POSITION, VES_BLEND_INDICES & VES_BLEND_WEIGHTS) |  | vertexConversionLut | [out] Table that maps the old vertices to their new location (only useful when the vertex data was actually shrunk) |  | srcData | [in] Pointers where to source the data from. |  | srcOffset | [in] Location in srcData to get each vertex element. |  | srcBytesPerVertex | [in] The vertex size per vertex buffer. |  | numVertices | [in] The total amount of vertices. |  
 
- Returns
- The new vertex count. Will be <= numVertices 
 
 
◆ useSameVaos()
Copies all the pointers in inVao to outVao so they are identical without cloning any memory. 
 
 
The documentation for this class was generated from the following file: