D3DXCreatePMeshFromStream
Creates a progressive mesh from a stream object.
HRESULT D3DXCreatePMeshFromStream(
IStream* pStream,
DWORD Options,
LPDIRECT3DDEVICE8 pD3DDevice,
LPD3DXBUFFER* ppMaterials,
DWORD* pNumMaterials,
LPD3DXPMESH* ppPMesh
);
Parameters
- pStream
- [in] Pointer to an IStream interface, representing the stream object from which to create the progressive mesh. The data in this stream was generated with the ID3DXPMesh::Save method.
- 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 to be associated with the progressive mesh.
- ppMaterials
- [out] Address of a pointer to an ID3DXBuffer interface. When this method returns, this parameter is filled with an array of D3DXMATERIAL structures, containing information saved in the stream object.
- pNumMaterials
- [out] Pointer to the number of D3DXMATERIAL structures in the ppMaterials array, when the method returns.
- ppPMesh
- [out] Address of a pointer to an ID3DXPMesh interface, representing the created progressive 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.
Remarks
For more information on the IStream interface, see the Microsoft Platform Software Development Kit (SDK).
Requirements
Header: Declared in D3dx8mesh.h.
Import Library: Use D3dx8.lib.
See Also
ID3DXPMesh::Save