CHAPTER 5 ■ GETTING THE MOST OUT OF VERTICES
516
After the for loop, the verticesList contains two vertices for each center point of your
track. However, when you render triangles from this list of vertices, there will still be a small
gap between the last center point and the first center point. To bridge this gap, you need to
copy the side points of the first two center points to the end of your list. However, since the
Ytexturecoordinateofthefirsttwoverticesequals0,youneedtoadjustthistothecurrent
texturecoordinatevalue.Otherwise,thelasttwotriangleswouldhavetospantheirYtexture
coordinate from the last value all the way back to 0, resulting in a lot of texture smashed onto
two tiny triangles.
Finally, you convert ...