ID3DXPMesh::Save

Bb174110.XDK_CHM_BANNER_left(en-us,VS.85).jpg Bb174110.XDK_CHM_BANNER_right(en-us,VS.85).jpg

NOTE: The ID3DXPMesh and ID3DXSPMesh interfaces are now obsolete and will be removed in a future release.

ID3DXPMesh::Save

Saves the progressive mesh to the specified stream object.

  HRESULT 
  Save(
  IStream * pStream,
  CONST D3DXMATERIAL * pMaterials,
  CONST D3DXEFFECTINSTANCE* pEffectInstances,
  DWORD NumMaterials
);

Parameters

  • pStream
    [in] Pointer to an IStream interface, representing the stream object to which the file data is written.
  • pMaterials
    [in] Pointer to an array of D3DXMATERIAL structures, containing material information to be saved in the stream object.
  • pEffectInstances
    [in] Pointer to an array of effect instances, one per attribute group in the mesh. An effect instance is a particular instance of state information used to initialize an effect. For more information, see D3DXEFFECTINSTANCE.
  • NumMaterials
    [in] Number of D3DXMATERIAL structures in the pMaterials array.

Return Values

If the method succeeds, the return value is D3D_OK. If the method fails, the return value can be one of the following: D3DERR_INVALIDCALL, D3DXERR_INVALIDDATA, E_OUTOFMEMORY.

Remarks

For more information about the IStream interface, see the Platform SDK.

Requirements

Header: Declared in D3DX9Mesh.h.

Library: Use D3dx9.lib.