diff --git a/GPU/Common/IndexGenerator.cpp b/GPU/Common/IndexGenerator.cpp index d339fb4790..c80a866b48 100644 --- a/GPU/Common/IndexGenerator.cpp +++ b/GPU/Common/IndexGenerator.cpp @@ -88,12 +88,22 @@ void IndexGenerator::AddStrip(int numVerts, bool clockwise) { const int numTris = numVerts - 2; u16 *outInds = inds_; int ibase = index_; - for (int i = 0; i < numTris; i++) { + size_t numPairs = numTris / 2; + while (numPairs > 0) { + *outInds++ = ibase; + *outInds++ = ibase + wind; + *outInds++ = ibase + (wind ^ 3); + *outInds++ = ibase + 1; + *outInds++ = ibase + 1 + (wind ^ 3); + *outInds++ = ibase + 1 + wind; + ibase += 2; + numPairs--; + } + if (numTris & 1) { *outInds++ = ibase; *outInds++ = ibase + wind; wind ^= 3; // toggle between 1 and 2 *outInds++ = ibase + wind; - ibase++; } inds_ = outInds; index_ += numVerts;