# Triangle strips

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

## 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 on other sites
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 on other sites
Quote:
 Original post by sirob(I forget what this technique is called).

Degenerate triangles.

##### 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 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.

1. 1
2. 2
3. 3
4. 4
Rutin
12
5. 5

• 26
• 10
• 9
• 9
• 11
• ### Forum Statistics

• Total Topics
633694
• Total Posts
3013378
×