D3DXTessellateRectPatch function

Tessellates a rectangular higher-order surface patch into a triangle mesh.

Syntax

HRESULT D3DXTessellateRectPatch(
  _In_          LPDIRECT3DVERTEXBUFFER9 pVB,
  _In_    const FLOAT                   *pNumSegs,
  _In_    const D3DVERTEXELEMENT9       *pInDecl,
  _In_    const D3DRECTPATCH_INFO       *pRectPatchInfo,
  _Inout_       LPD3DXMESH              pMesh
);

Parameters

pVB [in]

Type: LPDIRECT3DVERTEXBUFFER9

Vertex buffer containing the patch data.

pNumSegs [in]

Type: const FLOAT*

Pointer to an array of four floating-point values that identify the number of segments into which each edge of the rectangle patch should be divided when tessellated. See D3DRECTPATCH_INFO.

pInDecl [in]

Type: const D3DVERTEXELEMENT9*

Vertex declaration structure that defines the vertex data. See D3DVERTEXELEMENT9.

pRectPatchInfo [in]

Type: const D3DRECTPATCH_INFO*

Describes a rectangular patch. See D3DRECTPATCH_INFO.

pMesh [in, out]

Type: LPD3DXMESH

Pointer to the created mesh. See ID3DXMesh.

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

Remarks

Use D3DXRectPatchSize to get the number of output vertices and indices that the tessellation function needs.

Requirements

Requirement Value
Header
D3DX9Mesh.h
Library
D3dx9.lib

See also

Mesh Functions

D3DXTessellateTriPatch