mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Minor optimization in IndexGenerator::AddStrip.
This commit is contained in:
parent
1bf83efe9e
commit
9a51d25279
1 changed files with 3 additions and 3 deletions
|
@ -101,13 +101,13 @@ void IndexGenerator::AddStrip(int numVerts) {
|
|||
int wind = 1;
|
||||
const int numTris = numVerts - 2;
|
||||
u16 *outInds = inds_;
|
||||
const int startIndex = index_;
|
||||
for (int i = 0; i < numTris; i++) {
|
||||
const int ibase = startIndex + i;
|
||||
int ibase = index_;
|
||||
for (int i = numTris; i; i--) {
|
||||
*outInds++ = ibase;
|
||||
*outInds++ = ibase + wind;
|
||||
wind ^= 3; // toggle between 1 and 2
|
||||
*outInds++ = ibase + wind;
|
||||
ibase++;
|
||||
}
|
||||
inds_ = outInds;
|
||||
index_ += numVerts;
|
||||
|
|
Loading…
Add table
Reference in a new issue