Microsoft DirectX 9.0

ID3DXSPMesh::ClonePMesh Method

Clones a progressive mesh using a declarator.


HRESULT ClonePMesh(      

    DWORD Options,     CONST LPD3DVERTEXELEMENT9 pDeclaration,     LPDIRECT3DDEVICE9 pDevice,     DWORD *pVertexRemapOut,     FLOAT *pErrorsByFace,     LPD3DXPMESH *ppCloneMesh );


[in] Combination of one or more flags from the D3DXMESH enumeration, specifying creation options for the mesh. The following flags are defined.
[in] Array of D3DVERTEXELEMENT9 elements describing the vertex format for the returned mesh. This parameter must map directly to an flexible vertex format (FVF).
[in] Pointer to an IDirect3DDevice9 interface, representing the device object associated with the mesh.
[out] Pointer to an array containing the index for each vertex.
[out] Pointer to an array containing error values.
[out, retval] Address of a pointer to an ID3DXPMesh interface, representing the cloned progressive mesh.

Return Value

If the method succeeds, the return value is D3D_OK.

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

D3DERR_INVALIDCALLThe method call is invalid. For example, a method's parameter may have an invalid value.
D3DXERR_CANNOTATTRSORTAttribute sort (D3DXMESHOPT_ATTRSORT) is not supported as an optimization technique.
E_OUTOFMEMORYMicrosoft?Direct3D?could not allocate sufficient memory to complete the call.

© 2002 Microsoft Corporation. All rights reserved.