Sign in to follow this  
Samurai Jack

Triangle strips

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this