i
i
i
i
i
i
i
i
550 12. Polygonal Techniques
For subsequent triangles in this strip, only one vertex has to be sent, since
the other two have already been sent with the previous triangle. For exam-
ple, sending triangle T
0
,onlyvertexv
3
is sent, and the vertices v
1
and v
2
from triangle T
0
are used to form triangle T
1
. For triangle T
2
,onlyvertex
v
4
is sent, and so on through the rest of the strip.
A sequential triangle strip of n vertices is defined as an ordered ver-
tex list
{v
0
, v
1
,...,v
n−1
}, (12.6)
with a structure imposed upon it indicating that triangle i is
v
i
v
i+1
v
i+2
,
(12.7)
where 0 ≤ i<n− 2. This sort of strip is called sequential because the
vertices are sent in the above mentioned sequence. The definition implies
that a sequential triangle strip of n vertices has n − 2 triangles; we call it
a triangle strip of length n −2.
The analysis of the average number of vertices for a triangle strip of
length m (i.e., consisting of m triangles), also denoted v
a
,isthesameas
for triangle fans (see Equation 12.5), since they have the same start-up
phase and then send only one vertex per new triangle. Similarly, when
m →∞, v
a
for triangle strips naturally also tends toward one vertex per
triangle. For m = 20, v
a
=1.1,whichismuchbetterthan3andiscloseto
the limit of 1.0. As with triangle fans, the start-up cost for the first triangle
(always costing three vertices) is amortized over the subsequent triangles.
The attractiveness of triangle strips stems from this fact. Depending
on where the bottleneck is located in the rendering pipeline, there is a
potential for saving two-thirds of the time spent rendering without sequen-
tial triangle strips. The speedup is due to avoiding redundant operations,
i.e., sending each vertex twice to the graphics hardware, then performing
matrix transformations, lighting calculations, clipping, etc. on each.
By not imposing a strict sequence on the triangles, as was done for the
sequential triangle strips, one can create longer, and thus more efficient,
strips. These are called generalized triangle strips [242]. To be able to use
such strips, there must be some kind of vertex cache on the graphics card
that holds transformed and lit vertices. This is called the post-transform
cache.
3
The vertices in this cache can be accessed and replaced by sending
short bit codes. As will be seen in the next section, this idea has been
generalized to allow the efficient processing of triangle meshes.
A way to generalize sequential triangle strips a bit is to introduce a swap
operation, which swaps the order of the two latest vertices. In Iris GL [588],
3
Vertex caches are also occasionally called vertex buffers in the literature. We avoid
this term here, as vertex buffer is used in DirectX to mean a primitive consisting of a
set of vertices.