...indexed Primitive + trianglestrip...

Started by
1 comment, last by danrok 20 years, 7 months ago
Hi everybody! I've got a little problem with drawIndexedPrimitiv and the D3DPT_TRIANGLESTRIP Flag. The vertex-buffer in my Programm contains 4 vertices ( (-1.0, 1.0), (1.0, 1.0), (-1.0, -1.0), (1.0, -1.0) in this order ) and the index-buffer with 4 indices ( 3, 1, 4, 2 ).

1(-1.0, 1.0)------2(1.0, 1.0)
|                 /|
|                / |
|               /  |
|              /   |
|             /    |
|            /     |
|           /      |
|          /       |
3(-1.0, -1.0)----4(1.0, -1.0)
m_pd3dDevice->DrawIndexedPrimitive(D3DPT_TRIANGLESTRIP, 0, 1, 4, 0, 2); But the call of drawIndexedPrimitiv, don't produce the expected quad, only some degenerated triangles. Does somebody know a solution? thx [edited by - danrok on September 1, 2003 6:54:50 AM]
- n/a -
Advertisement
Your indices should be 0 based. Thats the best i can come up with without downloading the DX9 sdk help files
CYer, Blitz
Thank you! This was the mistake. Now everything works fine
- n/a -

This topic is closed to new replies.

Advertisement