Microsoft DirectX 8.0 (C++)

D3DXTesselateMesh

Tessellates a mesh.

HRESULT D3DXTesselateMesh(
  LPD3DXMESH pMeshIn,
  CONST DWORD* pAdjacency,
  FLOAT NumSegs,
  BOOL bQuadraticNormals
  LPD3DXMESH* ppMeshOut
);

Parameters

pMeshIn
[in] Pointer to an ID3DXMesh interface, representing the mesh to tessellate.
pAdjacency
[in] Pointer to an array of three DWORDs per face that specify the three neighbors for each face in the source mesh.
NumSegs
[in] Number of segments per edge to tessellate.
bQuadraticNormals
[in] If set to TRUE, use quadratic interpolation for normals. If set to FALSE, use linear interpolation.
ppMeshOut
[out] Address of a pointer to an ID3DXMesh interface, representing the returned tessellated 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 values.

D3DERR_INVALIDCALL
D3DXERR_INVALIDDATA
E_OUTOFMEMORY

Note  This function tessellates by using the n-Patch algorithm.

Requirements

  Header: Declared in D3dx8mesh.h.
  Import Library: Use D3dx8.lib.