• ### Announcements

#### Archived

This topic is now archived and is closed to further replies.

# ...indexed Primitive + trianglestrip...

## Recommended Posts

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]

##### Share on other sites
Your indices should be 0 based. Thats the best i can come up with without downloading the DX9 sdk help files
CYer, Blitz

##### Share on other sites
Thank you! This was the mistake. Now everything works fine

• ### Forum Statistics

• Total Topics
628288
• Total Posts
2981846

• 11
• 10
• 10
• 11
• 17