Microsoft DirectX 8.1 (Visual Basic)

D3DXBaseMesh.CloneMesh

Clones a mesh using a declarator.

object.CloneMesh( _ 
    Options As Long, _ 
    Declaration As Any, _ 
    Device As Direct3DDevice8) As D3DXMesh

Parts

object
Object expression that resolves to a D3DXBaseMesh object.
Options
A combination of one or more flags defined by the CONST_D3DXMESH enumeration, specifying creation options for the mesh.
Declaration
First element of an array of Long values, representing the declarator to describe the vertex format of the vertices in the output mesh.
Device
Direct3DDevice8 object representing the device object associated with the mesh.

Return Values

D3DXMesh object, representing the cloned mesh.

Error Codes

If the method fails, an error is raised and Err.Number can be set to one of the following values.

D3DERR_INVALIDCALL
E_OUTOFMEMORY

For information on trapping errors, see the Microsoft® Visual Basic® Error Handling topic.

Applies To

This method applies to the following classes, which implement methods from D3DXBaseMesh.

See Also

D3DX8.DeclaratorFromFVF, D3DXBaseMesh.GetDeclaration