?/TD> |
Microsoft DirectX 9.0 |
Creates a new patch mesh with the specified vertex declaration.
Syntax
HRESULT CloneMesh(
DWORD Options, CONST D3DVERTEXELEMENT9* pDecl, LPD3DXPATCHMESH* ppCloneMesh );
Parameters
- Options
- [in] Combination of one or more D3DXMESH flags that specify creation options for the mesh.
- pDecl
- [in] Array of D3DVERTEXELEMENT9 elements that specify the vertex format for the vertices in the output mesh.
- ppCloneMesh
- [out, retval] Address of a pointer to an ID3DXPatchMesh interface that represents 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_INVALIDCALL The method call is invalid. For example, a method's parameter may have an invalid value. E_OUTOFMEMORY Microsoft?Direct3D?could not allocate sufficient memory to complete the call.
Remarks
ID3DXPatchMesh::CloneMesh 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 also have adjacency.