D3DXLoadMeshHierarchyFromXInMemory
Loads the first frame hierarchy from a .x file.
HRESULT D3DXLoadMeshHierarchyFromXInMemory(
LPCVOID pMemory,
DWORD SizeOfMemory,
DWORD MeshOptions,
LPDIRECT3DDEVICE9 pDevice,
LPD3DXALLOCATEHIERARCHY pAlloc,
LPD3DXLOADUSERDATA pUserDataLoader,
LPD3DXFRAME * ppFrameHeirarchy,
LPD3DXANIMATIONCONTROLLER * ppAnimController
);
Parameters
- pMemory
- [in] ] Pointer to a buffer that contains the mesh hierarchy.
- SizeOfMemory
- [in] Size of the pMemory buffer, in bytes.
- MeshOptions
- [in] Combination of one or more flags from the D3DXMESH enumeration that specify creation options for the mesh.
- pDevice
- [in] Pointer to an IDirect3DDevice9 interface, the device object associated with the mesh.
- pAlloc
- [in] Pointer to an ID3DXAllocateHierarchy interface.
- pUserDataLoader
- [in] Application provided interface that allows loading of user data. See ID3DXLoadUserData.
- ppFrameHeirarchy
- [out, retval] Returns a pointer to the loaded frame heirarchy. See D3DXFRAME.
- ppAnimController
- [out, retval] Returns a pointer to the animation controller corresponding to animation in the .x file. This is created with default tracks and events. See ID3DXAnimationController.
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, E_OUTOFMEMORY.
Remarks
All the meshes in the file will be collapsed into one output mesh. If the file contains a frame hierarchy, all the transformations will be applied to the mesh.
Requirements
Header: Declared in D3dx9anim.h.