![]() |
![]() |
![]() |
Tessellates a triangular higher-order surface patch into a triangle mesh.
Syntax
HRESULT WINAPI D3DXTessellateTriPatch(
LPDIRECT3DVERTEXBUFFER9 pVB, const FLOAT *pNumSegs, const D3DVERTEXELEMENT9 *pInDecl, const D3TRIPATCH_INFO *pTriPatchInfo, LPD3DXMESH pMesh );
Parameters
- pVB
- [in] Vertex buffer containing the patch data.
- pNumSegs
- [in] Pointer to an array of three floating-point values that identify the number of segments into which each edge of the triangle patch should be divided when tessellated. See D3DTRIPATCH_INFO.
- pInDecl
- [in] Vertex declaration structure that defines the vertex data. See D3DVERTEXELEMENT9.
- pTriPatchInfo
- [in] Describes a triangle patch. See D3DTRIPATCH_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:
D3DERR_INVALIDCALL The method call is invalid. For example, a method's parameter may have an invalid value. E_OUTOFMEMORY Microsoft Direct3D could not allocate sufficient memory to complete the call.
Remarks
Use D3DXTriPatchSize to get the number of output vertices and indices that the tessellation function needs.
Function Information
Header d3dx9mesh.h Import library d3dx9.lib Minimum operating systems Windows 98
See Also
D3DXTessellateRectPatch