summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/Src/IndexGenerator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/VideoCommon/Src/IndexGenerator.cpp')
-rw-r--r--Source/Core/VideoCommon/Src/IndexGenerator.cpp20
1 files changed, 16 insertions, 4 deletions
diff --git a/Source/Core/VideoCommon/Src/IndexGenerator.cpp b/Source/Core/VideoCommon/Src/IndexGenerator.cpp
index f18356f8e7..b2dd3efd49 100644
--- a/Source/Core/VideoCommon/Src/IndexGenerator.cpp
+++ b/Source/Core/VideoCommon/Src/IndexGenerator.cpp
@@ -31,6 +31,8 @@ void IndexGenerator::Start(unsigned short *startptr)
ptr = startptr;
index = 0;
numPrims = 0;
+ adds = 0;
+ onlyLists = true;
}
void IndexGenerator::AddList(int numVerts)
@@ -45,6 +47,7 @@ void IndexGenerator::AddList(int numVerts)
}
index += numVerts;
numPrims += numTris;
+ adds++;
}
void IndexGenerator::AddStrip(int numVerts)
@@ -61,6 +64,8 @@ void IndexGenerator::AddStrip(int numVerts)
}
index += numVerts;
numPrims += numTris;
+ adds++;
+ onlyLists = false;
}
void IndexGenerator::AddLineList(int numVerts)
@@ -74,6 +79,7 @@ void IndexGenerator::AddLineList(int numVerts)
}
index += numVerts;
numPrims += numLines;
+ adds++;
}
void IndexGenerator::AddLineStrip(int numVerts)
@@ -87,9 +93,10 @@ void IndexGenerator::AddLineStrip(int numVerts)
}
index += numVerts;
numPrims += numLines;
+ adds++;
+ onlyLists = false;
}
-
void IndexGenerator::AddFan(int numVerts)
{
int numTris = numVerts - 2;
@@ -102,6 +109,8 @@ void IndexGenerator::AddFan(int numVerts)
}
index += numVerts;
numPrims += numTris;
+ adds++;
+ onlyLists = false;
}
void IndexGenerator::AddQuads(int numVerts)
@@ -119,10 +128,13 @@ void IndexGenerator::AddQuads(int numVerts)
}
index += numVerts;
numPrims += numTris;
+ adds++;
+ onlyLists = false;
}
-
-void IndexGenerator::AddPointList(int numVerts)
+void IndexGenerator::AddPoints(int numVerts)
{
index += numVerts;
-} \ No newline at end of file
+ numPrims += numVerts;
+ adds++;
+}