Microsoft DirectX 8.0 (Visual Basic) |
Describes a rectangular high-order patch.
Type D3DRECTPATCH_INFO Basis As CONST_D3DBASISTYPE Height As Long Order As CONST_D3DORDERTYPE StartVertexOffsetHeight As Long StartVertexOffsetWidth As Long StrideBytes As Long Width As Long End Type
To render a stream of individual rectangular patches (non-mosaic), you should interpret your geometry as a long narrow (1 × N) rectangular patch. The D3DRECTPATCH_INFO structure for such a strip (cubic bézier) would be set up in the following manner.
Dim i As Integer Dim RectInfo As D3DRECTPATCH_INFO With D3DRECTPATCH_INFO .Width = 4 .Height = 4 .Stride = 4 .Basis = D3DBASIS_BEZIER .Order = D3DORDER_CUBIC .StartVertexOffsetWidth = 0 .StartVertexOffsetHeight = 4 * i ' The variable i is the index of the patch you want to render. End With