HRESULT DrawIndexedPrimitive (
D3DPRIMITIVETYPE Type,
INT BaseVertexIndex,
UINT MinIndex,
UINT NumVertices,
UINT StartIndex,
UINT PrimitiveCounts
);
參數1:Type 圖元類型
參數2:BaseVertexIndex 調用的時候,用這個數加上設置好的索引,得到新的索引,原來的索引是{6,7,9},這裏設置爲2,則新索引爲{8,9,11}
參數3:MinIndex 將被引用的最小索引值(不算上BaseVertexIndex ),即上面的索引6
參數4:NumVertices 完成圖元要用到的頂點數
參數5:StartIndex 開始渲染的索引下標,即從6開始使用,則參數爲0,若7,則1
參數6:PrimitiveCounts 要繪製的圖元個數