D3DXTessellateNPatches function

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

Syntax

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

Parameters

pMeshIn [in]

Type: LPD3DXMESH

Pointer to an ID3DXMesh interface, representing the mesh to tessellate.

pAdjacencyIn [in]

Type: const CONST DWORD*

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]

Type: FLOAT

Number of segments per edge to tessellate.

QuadraticInterpNormals [in]

Type: BOOL

Set to TRUE to use quadratic interpolation for normals; set to FALSE for linear interpolation.

ppMeshOut [out]

Type: LPD3DXMESH*

Address of a pointer to an ID3DXMesh interface, representing the returned tessellated mesh.

ppAdjacencyOut [out]

Type: LPD3DXBUFFER*

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

Remarks

This function tessellates by using the N-patch algorithm.

Requirements

Requirement Value
Header
D3DX9Mesh.h
Library
D3dx9.lib

See also

Mesh Functions