Microsoft DirectX 8.1 (C++)

D3DXLoadSkinMeshFromXof

Loads a skin mesh from a Microsoft® DirectX® .x file data object.

HRESULT D3DXLoadSkinMeshFromXof(
  LPDIRECTXFILEDATA pXofObjMesh,
  DWORD Options,
  LPDIRECT3DDEVICE8 pD3DDevice,
  LPD3DXBUFFER* ppAdjacency,
  LPD3DXBUFFER* ppMaterials,
  PDWORD pMatOut,
  LPD3DXBUFFER* ppBoneNames,
  LPD3DXBUFFER* ppBoneTransforms,
  LPD3DXSKINMESH* ppMesh
);

Parameters

pXofObjMesh
[in] Pointer to an IDirectXFileData interface, representing the DirectX file data object to load.
Options
[in] A combination of one or more flags from the D3DXMESH enumeration, specifying creation options for the mesh.
pD3DDevice
[in] Pointer to an IDirect3DDevice8 interface, the device object associated with the mesh.
ppAdjacency
[in, out] Address of a pointer to an ID3DXBuffer interface. When this method returns, this parameter is filled with an array of three DWORDs per face that specify the three neighbors for each face in the mesh.
ppMaterials
[in, out] Address of a pointer to an ID3DXBuffer interface. When the method returns, this parameter is filled with an array of D3DXMATERIAL structures.
pMatOut
[in, out] Pointer to the number of D3DXMATERIAL structures in the ppMaterials array, when the method returns.
ppBoneNames
[in, out] Address of a pointer to an ID3DXBuffer interface, containing the bone names.
ppBoneTransforms
[in, out] Address of a pointer to an ID3DXBuffer interface, containing the bone transforms.
ppMesh
[out, retval] Address of a pointer to an ID3DXSkinMesh interface, representing the loaded mesh.

Return Values

If the function succeeds, the return value is D3D_OK.

If the function fails, the return value can be one of the following values.

D3DERR_INVALIDCALL
D3DXERR_INVALIDDATA
E_OUTOFMEMORY

Remarks

This method takes a pointer to an internal object in the .x file, enabling you to load the frame hierarchy.

Requirements

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