Microsoft DirectX 9.0

ID3DXSPMesh::CloneMeshFVF Method

Clones a mesh using a flexible vertex format (FVF) code.


HRESULT CloneMeshFVF(      

    DWORD Options,     DWORD FVF,     LPDIRECT3DDEVICE9 pDevice,     DWORD *pAdjacencyOut,     DWORD *pVertexRemapOut,     LPD3DXMESH *ppCloneMesh );


[in] Combination of one or more flags from the D3DXMESH enumeration, specifying creation options for the mesh.
[in] Combination of FVF codes, specifying the vertex format for the vertices in the output mesh. For the values of the codes, see D3DFVF.
[in] Pointer to an IDirect3DDevice9 interface, representing the device object associated with the mesh.
[out] Pointer to an array of three DWORDs per face, specifying the three neighbors for each face in the source mesh.
[out] Pointer to an array containing the index for each vertex.
[out] Address of a pointer to an ID3DXPMesh interface, representing the cloned 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.
E_OUTOFMEMORYMicrosoft?Direct3D?could not allocate sufficient memory to complete the call.


CloneMeshFVF can be used to convert a mesh from one FVF to another.

See Also

ID3DXSPMesh::GetFVF, D3DXFVFFromDeclarator

© 2002 Microsoft Corporation. All rights reserved.