ID3DXAllocateHierarchy::CreateMeshContainer method

Requests allocation of a mesh container object.

Syntax

HRESULT CreateMeshContainer(
  [in]                LPCSTR              Name,
  [in]          const D3DXMESHDATA        *pMeshData,
  [in]          const D3DXMATERIAL        *pMaterials,
  [in]          const D3DXEFFECTINSTANCE  *pEffectInstances,
  [in]                DWORD               NumMaterials,
  [in]          const DWORD               *pAdjacency,
  [in]                LPD3DXSKININFO      pSkinInfo,
  [out, retval]       LPD3DXMESHCONTAINER *ppNewMeshContainer
);

Parameters

Name [in]

Type: LPCSTR

Name of the mesh.

pMeshData [in]

Type: const D3DXMESHDATA*

Pointer to the mesh data structure. See D3DXMESHDATA.

pMaterials [in]

Type: const D3DXMATERIAL*

Array of materials used in the mesh.

pEffectInstances [in]

Type: const D3DXEFFECTINSTANCE*

Array of effect instances used in the mesh. See D3DXEFFECTINSTANCE.

NumMaterials [in]

Type: DWORD

Number of materials in the materials array.

pAdjacency [in]

Type: const DWORD*

Adjacency array for the mesh.

pSkinInfo [in]

Type: LPD3DXSKININFO

Pointer to the skin mesh object if skin data is found. See ID3DXSkinInfo.

ppNewMeshContainer [out, retval]

Type: LPD3DXMESHCONTAINER*

Returns the created mesh container. See D3DXMESHCONTAINER.

Return value

Type: HRESULT

The return values of this method are implemented by an application programmer. In general, if no error occurs, program the method to return D3D_OK. Otherwise, program the method to return an appropriate error message from D3DERR or D3DXERR, as this will cause D3DXLoadMeshHierarchyFromX to fail also, and return the error.

Requirements

Header
D3dx9anim.h
Library
D3dx9.lib

See also

ID3DXAllocateHierarchy