Last night i was trying something with indexed triangle strips.
I wanted to get something like here (ascii art )
1--3- 5 (numbers are vertex indexes in vertex buffer)
| \| \ |
0-2 -4
| \ | \|
6 7 8
index buffer:
i[0]=0
i[1]=1
i[2]=2
i[3]=3
i[4]=4
i[5]=5
i[6]=6
i[7]=0
i[8]=7
i[9]=2
i[10]=8
i[11]=4
now i tried to render it with
dev->DrawIndexedPrimitive(D3DPT_TRIANGLESTRIP,0,9,0,8);
but all triangles are NOT drawn, if i change 8 to 10 in
DrawIndexedPrimitive then i get all triangles.
WHY TWO EXTRA primitives?
thanx
impc
I wanted to get something like here (ascii art )
1--3- 5 (numbers are vertex indexes in vertex buffer)
| \| \ |
0-2 -4
| \ | \|
6 7 8
index buffer:
i[0]=0
i[1]=1
i[2]=2
i[3]=3
i[4]=4
i[5]=5
i[6]=6
i[7]=0
i[8]=7
i[9]=2
i[10]=8
i[11]=4
now i tried to render it with
dev->DrawIndexedPrimitive(D3DPT_TRIANGLESTRIP,0,9,0,8);
but all triangles are NOT drawn, if i change 8 to 10 in
DrawIndexedPrimitive then i get all triangles.
WHY TWO EXTRA primitives?
thanx
impc