ID3DXAllocateHierarchy::CreateMeshContainer

Requests allocation of a mesh container object.

HRESULT CreateMeshContainer(
  LPCSTR Name,
  CONST D3DXMESHDATA * pMeshData,
  CONST D3DXMATERIAL * pMaterials,
  CONST D3DXEFFECTINSTANCE * pEffectInstances,
  DWORD NumMaterials,
  CONST DWORD * pAdjacency,
  LPD3DXSKININFO pSkinInfo,
  LPD3DXMESHCONTAINER * ppNewMeshContainer
);

Parameters

Name
[in] Name of the mesh.
pMeshData
[in] Pointer to the mesh data structure. See D3DXMESHDATA.
pMaterials
[in] Array of materials used in the mesh.
pEffectInstances
[in] Array of effect instances used in the mesh. See D3DXEFFECTINSTANCE.
NumMaterials
[in] Number of materials in the materials array.
pAdjacency
[in] Adjacency array for the mesh.
pSkinInfo
[in] Pointer to the skin mesh object if skin data is found. See ID3DXSkinInfo.
ppNewMeshContainer
[out, retval] Returns the created mesh container. See D3DXMESHCONTAINER.

Return Values

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: Declared in D3dx9anim.h.