Jump to content
  • Advertisement
Sign in to follow this  
derek7

Does drawindexedprimitive support D3DPT_TRIANGLESTRIP and D3DPT_TRIANGLEFAN?

This topic is 4553 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I think strip and fan give the definition of triangle in a vertex buffer.so index do not need. right?

Share this post


Link to post
Share on other sites
Advertisement
The only type you can't used as indexed is a point list. You can still get benifits from using an indexed strip or fan, since you can share vertices.

Share this post


Link to post
Share on other sites
I think if you use strip or fan, you already define triangle with shared vertices.that is , fan and strip is similar to index. it define triangle according to vertex list. Could you give me a example that demonstrate triangles be defined by fan/strip and index together? thanks

Share this post


Link to post
Share on other sites
A regular grid. You have 1 long strip for each row, and you link 2 rows by adding degenerated tris. So, for this setup :

0 1 2 3

4 5 6 7

8 9 10 11


you have the indices

0, 4, 1, 5, 2, 6, 3, 7, 7, 11, 10, 6, 9, 5, 8, 4

You can't do that without using indices, since you'd have to add vertices.

oh, and DirectX specific questions should go in the DirectX forum.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!