Jump to content
  • Advertisement
Sign in to follow this  
Samurai Jack

Triangle strips

This topic is 4946 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

Greetings! I was wondering, if a mesh can be splitted to 5 trinagle non identical strips (each strip length is different), do I have to call 5x drawsubset for each of these strips, or is it possible, to create a buffer with souch characteristics: <single buffer> 5,<a,b,c,d,e>, 3,<a,b,c>, 7<a,b,c,d,e,f,g> etc... And then tell drawsubset with souch buffer?

Share this post


Link to post
Share on other sites
Advertisement
I think what you mean is if you can draw several triangle strips with one DrawPrim call.

If that's what you're asking, then no. However, theres a workaround, which allows you to draw one tri-strip which is split into two parts. What you do is this:

original strip1 vertices: a, b, c.
original strip2 vertices: d, e, f.

combined strip vertices: a, b, c, c, d, d, e, f.

Since you're drawing two vertices in a row, at the same location, you're creating an invisible triangle, since it's width is 0.

This is a workaround since you're drawing 2 extra vertices (and 4 extra triangles), though this method's performance should be better than 2 drawprim calls.

(I forget what this technique is called).

Share this post


Link to post
Share on other sites
Quote:
Original post by Coder
Quote:
Original post by sirob
(I forget what this technique is called).

Degenerate triangles.


OMG!! Coder, where have you been?

Share this post


Link to post
Share on other sites
Quote:
Original post by Pipo DeClown
Quote:
Original post by Coder
Quote:
Original post by sirob
(I forget what this technique is called).

Degenerate triangles.


OMG!! Coder, where have you been?

Sitting in a dark corner, watching the forums. Didn't have time to do anything else.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!