Generates an optimized face remapping for a triangle list.
HRESULT D3DXOptimizeFaces( _In_ LPCVOID pIndices, _In_ UINT NumFaces, _In_ UINT NumVertices, _In_ BOOL Indices32Bit, _Inout_ DWORD *pFaceRemap );
- pIndices [in]
Pointer to triangle list indices to use for ordering vertices.
- NumFaces [in]
Number of faces in the triangle list. For 16-bit meshes, this is limited to 2^16 - 1 (65535) or fewer faces.
- NumVertices [in]
Number of vertices referenced by the triangle list.
- Indices32Bit [in]
Flag indicating index type: TRUE if indices are 32-bit (more than 65535 indices), FALSE if indices are 16-bit (65535 or fewer indices).
- pFaceRemap [in, out]
Pointer to the original mesh face that was split to generate the current face.
If the function succeeds, the return value is D3D_OK. If the function fails, the return value can be one of the following: D3DERR_INVALIDCALL, E_OUTOFMEMORY.
This function's optimization procedure is functionally equivalent to calling ID3DXMesh::Optimize with the D3DXMESHOPT_DEVICEINDEPENDENT flag, but this function makes more efficient use of vertex caches.