|
@@ -349,6 +349,7 @@ void Polyline::draw()
|
|
|
}
|
|
|
|
|
|
// Fill the index array to make 2 triangles from each quad.
|
|
|
+ // NOTE: The triangle vertex ordering here is important!
|
|
|
for (size_t i = 0; i < numindices / 6; i++)
|
|
|
{
|
|
|
// First triangle.
|
|
@@ -357,8 +358,8 @@ void Polyline::draw()
|
|
|
indices[i * 6 + 2] = GLushort(i * 4 + 2);
|
|
|
|
|
|
// Second triangle.
|
|
|
- indices[i * 6 + 3] = GLushort(i * 4 + 2);
|
|
|
- indices[i * 6 + 4] = GLushort(i * 4 + 1);
|
|
|
+ indices[i * 6 + 3] = GLushort(i * 4 + 0);
|
|
|
+ indices[i * 6 + 4] = GLushort(i * 4 + 2);
|
|
|
indices[i * 6 + 5] = GLushort(i * 4 + 3);
|
|
|
}
|
|
|
}
|