summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/Src/IndexGenerator.cpp
diff options
context:
space:
mode:
authorhrydgard <hrydgard@gmail.com>2009-09-26 12:39:12 +0000
committerhrydgard <hrydgard@gmail.com>2009-09-26 12:39:12 +0000
commit29808cdde2aa918f453d9d466e238f24a1f2d62f (patch)
tree6d64a4a4fb275469872658d357179f7733a15d2a /Source/Core/VideoCommon/Src/IndexGenerator.cpp
parent5a7fbd63c2a496a1c4964f8bb9c05384cc2ef84b (diff)
OpenGL: commit rodolfoosvaldobogado's (what a name!) speedup patches.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4322 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/VideoCommon/Src/IndexGenerator.cpp')
-rw-r--r--Source/Core/VideoCommon/Src/IndexGenerator.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/Src/IndexGenerator.cpp b/Source/Core/VideoCommon/Src/IndexGenerator.cpp
index b2dd3efd49..407fbe6579 100644
--- a/Source/Core/VideoCommon/Src/IndexGenerator.cpp
+++ b/Source/Core/VideoCommon/Src/IndexGenerator.cpp
@@ -32,6 +32,7 @@ void IndexGenerator::Start(unsigned short *startptr)
index = 0;
numPrims = 0;
adds = 0;
+ indexLen = 0;
onlyLists = true;
}
@@ -45,6 +46,7 @@ void IndexGenerator::AddList(int numVerts)
*ptr++ = index+i*3+1;
*ptr++ = index+i*3+2;
}
+ indexLen += numVerts;
index += numVerts;
numPrims += numTris;
adds++;
@@ -62,6 +64,7 @@ void IndexGenerator::AddStrip(int numVerts)
*ptr++ = index+i+(wind?1:2);
wind = !wind;
}
+ indexLen += numTris * 3;
index += numVerts;
numPrims += numTris;
adds++;
@@ -77,6 +80,7 @@ void IndexGenerator::AddLineList(int numVerts)
*ptr++ = index+i*2;
*ptr++ = index+i*2+1;
}
+ indexLen += numVerts;
index += numVerts;
numPrims += numLines;
adds++;
@@ -91,6 +95,7 @@ void IndexGenerator::AddLineStrip(int numVerts)
*ptr++ = index+i;
*ptr++ = index+i+1;
}
+ indexLen += numLines * 2;
index += numVerts;
numPrims += numLines;
adds++;
@@ -107,6 +112,7 @@ void IndexGenerator::AddFan(int numVerts)
*ptr++ = index+i+1;
*ptr++ = index+i+2;
}
+ indexLen += numTris * 3;
index += numVerts;
numPrims += numTris;
adds++;
@@ -126,6 +132,7 @@ void IndexGenerator::AddQuads(int numVerts)
*ptr++ = index+i*4+2;
*ptr++ = index+i*4+3;
}
+ indexLen += numTris * 3;
index += numVerts;
numPrims += numTris;
adds++;