D3DXOptimizeVertices
Microsoft DirectX 9.0 SDK Update (October 2004)

D3DXOptimizeVertices Function


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_INVALIDCALLThe method call is invalid. For example, a method's parameter may have an invalid value.
E_OUTOFMEMORYMicrosoft Direct3D could not allocate sufficient memory to complete the call.


Function Information

Headerd3dx9mesh.h
Import libraryd3dx9.lib
Minimum operating systems Windows 98


© 2004 Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center.