#### Archived

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

# TRIANGLELIST or TRIANGLESTRIP

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

## 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 on other sites
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.

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