TRIANGLELIST or TRIANGLESTRIP
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
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.
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
|
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement