description | ms.assetid | title | ms.topic | ms.date | topic_type | api_name | api_type | api_location | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Generates an optimized vertex remapping for a triangle list. This function is commonly used after applying the face remapping generated by D3DXOptimizeFaces. |
a3b9cb68-204e-4e8f-a985-738d1cea1e29 |
D3DXOptimizeVertices function (D3DX9Mesh.h) |
reference |
05/31/2018 |
|
|
|
|
Generates an optimized vertex remapping for a triangle list. This function is commonly used after applying the face remapping generated by D3DXOptimizeFaces.
HRESULT D3DXOptimizeVertices(
_In_ LPCVOID pIndices,
_In_ UINT NumFaces,
_In_ UINT NumVertices,
_In_ BOOL Indices32Bit,
_Inout_ DWORD *pVertexRemap
);
-
pIndices [in]
-
Type: LPCVOID
Pointer to triangle list indices to use for ordering vertices.
-
NumFaces [in]
-
Type: UINT
Number of faces in the triangle list.
-
NumVertices [in]
-
Type: UINT
Number of vertices referenced by the triangle list.
-
Indices32Bit [in]
-
Type: BOOL
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]
-
Type: DWORD*
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.
Type: HRESULT
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.
By default, a mesh uses 16 bit indices when it is created unless the application specifies otherwise. To check whether an existing mesh uses 16-bit or 32-bit indices, call ID3DXBaseMesh::GetOptions and check for the D3DXMESH_32BIT flag.
Requirement | Value |
---|---|
Header |
|
Library |
|