![]() |
![]() |
![]() |
Generates an optimized vertex remapping for a triangle list. This function is commonly used after applying the face remapping generated by D3DXOptimizeFaces.
Syntax
HRESULT WINAPI D3DXOptimizeVertices(
LPCVOID pIndices, UINT NumFaces, UINT NumVertices, BOOL Indices32Bit, DWORD *pVertexRemap );
Parameters
- pIndices
- [in] Pointer to triangle list indices to use for ordering vertices.
- NumFaces
- [in] Number of faces in the triangle list.
- 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 vertices), FALSE if indices are 16-bit (65535 or fewer vertices).
- pVertexRemap
- [in, out] Pointer to a destination buffer that will contain the new index for each vertex. The value stored in pVertexRemap for a given element is the source vertex location in the new vertex ordering.
Return Value
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 The method call is invalid. For example, a method's parameter may have an invalid value. E_OUTOFMEMORY Microsoft Direct3D could not allocate sufficient memory to complete the call.
Function Information
Header d3dx9mesh.h Import library d3dx9.lib Minimum operating systems Windows 98