D3DXValidPatchMesh function

Validates a patch mesh, returning the number of degenerate vertices and patches.

Syntax

HRESULT D3DXValidPatchMesh(
  _In_  LPD3DXPATCHMESH pMeshIn,
  _Out_ DWORD           *pNumDegenerateVertices,
  _Out_ DWORD           *pNumDegeneratePatches,
  _Out_ LPD3DXBUFFER    *ppErrorsAndWarnings
);

Parameters

pMeshIn [in]

Type: LPD3DXPATCHMESH

Pointer to an ID3DXPatchMesh interface, representing the patch mesh to be tested.

pNumDegenerateVertices [out]

Type: DWORD*

Returns the number of degenerate vertices in the patch mesh.

pNumDegeneratePatches [out]

Type: DWORD*

Returns the number of degenerate patches in the patch mesh.

ppErrorsAndWarnings [out]

Type: LPD3DXBUFFER*

Returns a pointer to a buffer containing a string of errors and warnings that explain the problems found in the patch mesh.

Return value

Type: HRESULT

If the function succeeds, the return value is D3D_OK. If the function fails, the return value can be one of the following: D3DERR_INVALIDCALL, E_OUTOFMEMORY.

Remarks

This method validates the mesh by checking for invalid indices. Error information is available from the debugger output.

Requirements

Requirement Value
Header
D3DX9Mesh.h
Library
D3dx9.lib

See also

Mesh Functions