?/TD>
Microsoft DirectX 9.0

D3DXTessellateRectPatch Function


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

Syntax

HRESULT D3DXTessellateRectPatch(      

    LPDIRECT3DVERTEXBUFFER9 pVB,     CONST float *pNumSegs,     LPD3DVERTEXELEMENT9 pInDecl,     CONST D3DRECTPATCH_INFO *pRectPatchInfo,     LPD3DXMESH pMesh );

Parameters

pVB
[in] Vertex buffer containing the patch data.
pNumSegs
[in] Number of segments per edge to tessellate.
pInDecl
[in] Vertex declaration structure that defines the vertex data. See D3DVERTEXELEMENT9.
pRectPatchInfo
[in] Describes a rectangular patch. See D3DRECTPATCH_INFO.
pMesh
[in, out] Pointer to the created mesh. See ID3DXMesh.

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.

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.


Remarks

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

Function Information

Headerd3dx9mesh.h
Import libraryd3dx9.lib
Minimum operating systems Windows 98

See Also

D3DXTessellateTriPatch


© 2002 Microsoft Corporation. All rights reserved.