功能:基本图元的绘制(
Renders a sequence of nonindexed, geometric primitives of the specified type from the current set of data input streams.
)
HRESULT DrawPrimitive(
///基本图元的类型
D3DPRIMITIVETYPE PrimitiveType,
/起始顶点
UINT StartVertex,
绘制图元的数量
UINT PrimitiveCount
);
第一个参数PrimitiveType取值:
Member of the D3DPRIMITIVETYPE enumerated type, describing the type of primitive to render.
D3DPT_POINTLIST
//点列集合(一组点的集合)
D3DPT_LINELIST
//线列集合(一组线段的集合)
D3DPT_LINESTRIP
//线带集合(首尾相连的线段的集合)
D3DPT_TRIANGLELIST /
/三角形列(一组三角形的集合)
D3DPT_TRIANGLESTRIP /
/三角形带 (首尾相连的三角形,有两个顶点重
合)
D3DPT_TRIANGLEFAN
//三角形扇(组成扇形的一组三角形)