D3DXValidPatchMesh
Microsoft DirectX 9.0 SDK Update (October 2004)

D3DXValidPatchMesh Function


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

Syntax

HRESULT WINAPI 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 Value

If the function succeeds, the return value is D3D_OK.

If the function fails, the return value can be one of the following:

D3DERR_INVALIDCALLThe method call is invalid. For example, a method's parameter may have an invalid value.
E_OUTOFMEMORYMicrosoft Direct3D could not allocate sufficient memory to complete the call.


Remarks

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

Function Information

Headerd3dx9mesh.h
Import libraryd3dx9.lib
Minimum operating systems Windows 98


© 2004 Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center.