Microsoft DirectX 9.0

D3DXValidMesh Function

Validates a mesh.


HRESULT D3DXValidMesh(      

    LPD3DXMESH pMeshIn,     CONST DWORD *pAdjacency,     LPD3DXBUFFER *ppErrorsAndWarnings );


[in] Pointer to an ID3DXMesh interface, representing the mesh to be tested.
[in] Pointer to an array of three DWORDs per face that specify the three neighbors for each face in the mesh to be tested.
[out] Returns a buffer containing a string of errors and warnings, which explain the problems found in the 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 values.

D3DXERR_INVALIDMESHThe mesh is invalid.
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.


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

Function Information

Import libraryd3dx9.lib
Minimum operating systems Windows 98

© 2002 Microsoft Corporation. All rights reserved.