Jump to content
  • Advertisement

Archived

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

NONO

TRIANGLELIST or TRIANGLESTRIP

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

Hi Using directx8, I m wondering if I should use TRIANGLELIST or TRIANGLESTRIP. Trianglelist is much easier, but it takes more memory. Also, I don t really understant how to use correctly TRIANGLESTRIP. I don t even to render a cube with it (but with triangle list, I load 3ds model without any problems)... :-( Can you explain me a bit what s exactly trianglestrip and how does it work? NONO

Share this post


Link to post
Share on other sites
Advertisement
Tri-strips work by using only 1 vertex to define each triangle (after using 3 vertices for the first triangle). Each new vertex is used along with the previous 2 vertices to define each new triangle. Look at the 6 triangles below.

    

1 3 5 7
|----|----|----|
|\ B |\ D |\ F |
| \ | \ | \ |
| \ | \ | \ |
| A \| C \| E \|
|----|----|----|
0 2 4 6



We can define these triangles as a strip like this:

01234567

i.e.

012 (A)
=123 (B)
==234 (C)
===345 (D)
====456 (E)
=====567 (F)

Notice that the first 3 vertices define the first triangle, and then each subsequent vertex (along with the previous 2 vertices) defines each subsequent triangle.

Also note that the winding (ordering) alternates between CW and CCW as we traverse the strip. This means that culling will need to be disabled to draw this strip.

Helpful?

Andy.


Edited by - andy maddison on April 27, 2001 5:31:17 AM

Edited by - andy maddison on April 27, 2001 5:32:08 AM

Edited by - andy maddison on April 27, 2001 5:35:24 AM

Share this post


Link to post
Share on other sites

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