Game Engine Architecture

(Ben Green) #1
407

buff er (DirectX) or vertex array (OpenGL). The indices are stored in a separate
buff er known as an index buff er or index array. This technique is shown in Fig-
ure 10.7.


Strips and Fans


Specialized mesh data structures known as triangle strips and triangle fans are
sometimes used for game rendering. Both of these data structures eliminate
the need for an index buff er, while still reducing vertex duplication to some
degree. They accomplish this by predefi ning the order in which vertices must
appear and how they are combined to form triangles.


V 0

V 1

V 2

V 3

V 4

V 5

V 6

V 7

Indices 0 1 3 1 2 3 0 5 1 ... 5 7 6

Vertices V 0 V 1 V 2 V 3 V 4 V 5 V 6 V 7

Figure 10.7. An indexed triangle list.


Interpreted
as triangles: 01 2^132234354

Vertices V 0 V 1 V 2 V 3 V 4 V 5

V 0

V 1

V 2

V 3

V 4

V 5

Figure 10.8. A triangle strip.


10.1. Foundations of Depth-Buffered Triangle Rasterization

Free download pdf