PatchMesh.Clone(MeshFlags,GraphicsStream) Method (Microsoft.DirectX.Direct3D)

Creates a new patch mesh with the specified vertex declaration.

Definition

Visual Basic Public Function Clone( _
    ByVal options As MeshFlags, _
    ByVal decl As GraphicsStream _
) As PatchMesh
C# public PatchMesh Clone(
    MeshFlags options,
    GraphicsStream decl
);
C++ public:
PatchMeshClone(
    MeshFlags options,
    GraphicsStreamdecl
);
JScript public function Clone(
    options : MeshFlags,
    decl : GraphicsStream
) : PatchMesh;

Parameters

options Microsoft.DirectX.Direct3D.MeshFlags
Mesh creation options, indicated through one or more MeshFlags flags (excepting the Simplify* and Optimize* flags).
decl Microsoft.DirectX.GraphicsStream
A GraphicsStream containing VertexElement structures that specify the vertex format for the vertices in the output mesh.

Return Value

Microsoft.DirectX.Direct3D.PatchMesh
Cloned patch mesh.

Remarks

The PatchMesh.Clone method converts the vertex buffer to the new vertex declaration. Entries in the vertex declaration that are new to the original mesh are set to 0. If the current mesh has adjacency, the new mesh will have it also.

Exceptions

InvalidCallException

The method call is invalid. For example, a method's parameter might contain an invalid value.

OutOfMemoryExceptionLeave Site

Microsoft Direct3D could not allocate sufficient memory to complete the call.