Skip to content

Latest commit

 

History

History
97 lines (71 loc) · 4.15 KB

nf-d3d9-idirect3ddevice9-drawtripatch.md

File metadata and controls

97 lines (71 loc) · 4.15 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:d3d9.IDirect3DDevice9.DrawTriPatch
IDirect3DDevice9::DrawTriPatch (d3d9.h)
The IDirect3DDevice9::DrawTriPatch method (d3d9.h) draws a triangular patch using the currently set streams.
4db7630f-e9d1-c5ec-df98-7a2f4cde37cc
DrawTriPatch
DrawTriPatch method [Direct3D 9]
DrawTriPatch method [Direct3D 9]
IDirect3DDevice9 interface
IDirect3DDevice9 interface [Direct3D 9]
DrawTriPatch method
IDirect3DDevice9.DrawTriPatch
IDirect3DDevice9::DrawTriPatch
d3d9helper/IDirect3DDevice9::DrawTriPatch
direct3d9.idirect3ddevice9__drawtripatch
direct3d9\idirect3ddevice9__drawtripatch.htm
direct3d9
VS|directx_sdk|~\idirect3ddevice9__drawtripatch.htm
08/10/2022
4db7630f-e9d1-c5ec-df98-7a2f4cde37cc, DrawTriPatch, DrawTriPatch method [Direct3D 9], DrawTriPatch method [Direct3D 9],IDirect3DDevice9 interface, IDirect3DDevice9 interface [Direct3D 9],DrawTriPatch method, IDirect3DDevice9.DrawTriPatch, IDirect3DDevice9::DrawTriPatch, d3d9helper/IDirect3DDevice9::DrawTriPatch, direct3d9.idirect3ddevice9__drawtripatch
d3d9.h
D3D9.h
Windows
D3D9.lib
Windows
19H1
IDirect3DDevice9::DrawTriPatch
d3d9/IDirect3DDevice9::DrawTriPatch
c++
APIRef
kbSyntax
COM
D3D9.lib
D3D9.dll
IDirect3DDevice9.DrawTriPatch

IDirect3DDevice9::DrawTriPatch

-description

Draws a triangular patch using the currently set streams.

-parameters

-param Handle [in]

Type: UINT

Handle to the triangular patch to draw.

-param pNumSegs [in]

Type: const float*

Pointer to an array of three floating-point values that identify the number of segments each edge of the triangle patch should be divided into when tessellated. See D3DTRIPATCH_INFO.

-param pTriPatchInfo [in]

Type: const D3DTRIPATCH_INFO*

Pointer to a D3DTRIPATCH_INFO structure, describing the triangular high-order patch to draw.

-returns

Type: HRESULT

If the method succeeds, the return value is D3D_OK. If the method fails, the return value can be D3DERR_INVALIDCALL.

-remarks

For static patches: Set the vertex shader, set the appropriate streams, supply patch information in the pTriPatchInfo parameter, and specify a handle so that Direct3D can capture and cache information. To efficiently draw the patch, call IDirect3DDevice9::DrawTriPatch with pTriPatchInfo set to NULL. When drawing a cached patch, the currently set streams are ignored. Override the cached pNumSegs by specifying a new value for pNumSegs. When rendering a cached patch, you must set the same vertex shader that was set when it was captured.

Calling IDirect3DDevice9::DrawTriPatch with a handle invalidates the same handle cached by a previous IDirect3DDevice9::DrawRectPatch call.

For dynamic patches, the patch data changes for every rendering of the patch so it is not efficient to cache information. The application can convey this to Direct3D by setting Handle to 0. In this case, Direct3D draws the patch using the currently set streams and the pNumSegs values, and does not cache any information. It is not valid to simultaneously set Handle to 0 and pTriPatchInfo to NULL.

-see-also

IDirect3DDevice9

Using Higher-Order Primitives (Direct3D 9)