D3DXValidPatchMesh

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

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

Parameters

pMeshIn
[in] Pointer to an ID3DXPatchMesh interface, representing the patch mesh to be tested.
pNumDegenerateVertices
[out] Returns the number of degenerate vertices in the patch mesh.
pNumDegeneratePatches
[out] Returns the number of degenerate patches in the patch mesh.
ppErrorsAndWarnings
[out] Returns a pointer to a buffer containing a string of errors and warnings that explain the problems found in the patch mesh.

Return Values

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

Header: Declared in D3dx9mesh.h.