D3DXTessellateNPatches

Tessellates the given mesh using the N-patch tessellation scheme.

HRESULT D3DXTessellateNPatches(
  LPD3DXMESH pMeshIn,
  CONST CONST DWORD * pAdjacencyIn,
  FLOAT NumSegs,
  BOOL QuadraticInterpNormals,
  LPD3DXMESH * ppMeshOut,
  LPD3DXBUFFER * ppAdjacencyOut
);

Parameters

pMeshIn
[in] Pointer to an ID3DXMesh interface, representing the mesh to tessellate.
pAdjacencyIn
[in] Pointer to an array of three DWORDs per face that specify the three neighbors for each face in the source mesh. This parameter may be NULL.
NumSegs
[in] Number of segments per edge to tessellate.
QuadraticInterpNormals
[in] Set to TRUE to use quadratic interpolation for normals; set to FALSE for linear interpolation.
ppMeshOut
[out] Address of a pointer to an ID3DXMesh interface, representing the returned tessellated mesh.
ppAdjacencyOut
[out] Address of a pointer to an ID3DXBuffer interface. If the value of this parameter is not set to NULL>, this buffer will contain an array of three DWORDs per face that specify the three neighbors for each face in the output mesh. This parameter may be NULL.

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 values: D3DERR_INVALIDCALL, D3DXERR_INVALIDDATA, E_OUTOFMEMORY.

Remarks

This function tessellates by using the N-patch algorithm.

Requirements

Header: Declared in D3dx9mesh.h.