Microsoft DirectX 8.0 (C++)

ID3DXSkinMesh::ConvertToIndexedBlendedMesh

Returns an indexed blended mesh.

HRESULT ConvertToIndexedBlendedMesh(
  DWORD Options,
  CONST LPDWORD pAdjacencyIn,
  DWORD PaletteSize,
  LPDWORD pAdjacencyOut,
  DWORD* pNumBoneCombinations
  LPD3DXBUFFER* ppBoneCombinationTable
  LPD3DXMESH* ppMesh,
);

Parameters

Options
[in] A combination of one or more flags specifying creation options for the mesh. The following flags are defined.
D3DXMESH_32BIT
The mesh has 32-bit indices instead of 16-bit indices. A 32-bit mesh can support up to 2^32-1 faces and vertices. This flag is not supported and should not be used.
D3DXMESH_DONOTCLIP
Use the D3DUSAGE_DONOTCLIP usage flag for vertex and index buffers.
D3DXMESH_DYNAMIC
Equivalent to specifying both D3DXMESH_VB_DYNAMIC and D3DXMESH_IB_DYNAMIC.
D3DXMESH_RTPATCHES
Use the D3DUSAGE_RTPATCHES usage flag for vertex and index buffers.
D3DXMESH_NPATCHES
Specifying this flag causes the vertex and index buffer of the mesh to be created with D3DUSAGE_NPATCHES flag. This is required if the mesh object is to be rendered using N-Patch enhancement using Microsoft® Direct3D®.
D3DXMESH_MANAGED
Equivalent to specifying both D3DXMESH_VB_MANAGED and D3DXMESH_IB_MANAGED.
D3DXMESH_POINTS
Use the D3DUSAGE_POINTS usage flag for vertex and index buffers.
D3DXMESH_IB_DYNAMIC
Use the D3DUSAGE_DYNAMIC usage flag for index buffers.
D3DXMESH_IB_MANAGED
Use the D3DPOOL_MANAGED memory class for index buffers.
D3DXMESH_IB_SYSTEMMEM
Use the D3DPOOL_SYSTEMMEM memory class for index buffers.
D3DXMESH_IB_WRITEONLY
Use the D3DUSAGE_WRITEONLY usage flag for index buffers.
D3DXMESH_SYSTEMMEM
Equivalent to specifying both D3DXMESH_VB_SYSTEMMEM and D3DXMESH_IB_SYSTEMMEM.
D3DXMESH_VB_DYNAMIC
Use the D3DUSAGE_DYNAMIC usage flag for vertex buffers.
D3DXMESH_VB_MANAGED
Use the D3DPOOL_MANAGED memory class for vertex buffers.
D3DXMESH_VB_SYSTEMMEM
Use the D3DPOOL_SYSTEMMEM memory class for vertex buffers.
D3DXMESH_VB_WRITEONLY
Use the D3DUSAGE_WRITEONLY usage flag for vertex buffers.
D3DXMESH_WRITEONLY
Equivalent to specifying both D3DXMESH_VB_WRITEONLY and D3DXMESH_IB_WRITEONLY.
pAdjacencyIn
[in] Pointer to an array of three DWORDs per face that specify the three neighbors for each face in the source mesh.
PaletteSize
[in] The palette size.
pAdjacencyOut
[in, out] Pointer to a destination buffer for the face adjacency array of the optimized mesh. The face adjacency is stored as an array of arrays. The innermost array is three indices of adjacent triangles, and the outer array is one set of face adjacency per triangle in the mesh.
pNumBoneCombinations
[in, out] Number of entries.
ppBoneCombinationTable
[in, out] Address of a pointer to an array of D3DXBONECOMBINATION structures. The count of structures is pNumBoneCombinations. Each bone combination table defines the four bones that you can draw at a time.
ppMesh
[in, out] Address of a pointer to an ID3DXMesh interface, representing the indexed blended mesh.

Return Values

If the method succeeds, the return value is D3D_OK.

If the method fails, the return value can be D3DERR_INVALIDCALL.

Remarks

This method takes a skin mesh and converts it into an indexed blended mesh using the Microsoft® Direct3D® indexed vertex blending functionality available in Microsoft DirectX® 8.0. Indexed vertex blending uses indices to index into a matrix palette. For more information, see Geometry Blending. Converting a skin mesh into an indexed blended mesh enables you to render the mesh in a single drawing call.

Requirements

  Header: Declared in D3dx8mesh.h.
  Import Library: Use D3dx8.lib.