mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-29 17:23:40 +01:00
IndexGenerator: fix triangle fans
This commit is contained in:
1 parent
8c267b0105
commit
aabbbe9be4
1 file changed
+2
-2
@@ -165,7 +165,7 @@ void IndexGenerator::TranslateFan(int numVerts, const u8 *inds, int offset)
|
||||
int numTris = numVerts - 2;
|
||||
for (int i = 0; i < numTris; i++)
|
||||
{
|
||||
*inds_++ = index_ + offset + inds[i];
|
||||
*inds_++ = index_ + offset + inds[0];
|
||||
*inds_++ = index_ + offset + inds[i + 1];
|
||||
*inds_++ = index_ + offset + inds[i + 2];
|
||||
}
|
||||
@@ -210,7 +210,7 @@ void IndexGenerator::TranslateFan(int numVerts, const u16 *inds, int offset)
|
||||
int numTris = numVerts - 2;
|
||||
for (int i = 0; i < numTris; i++)
|
||||
{
|
||||
*inds_++ = index_ + offset + inds[i];
|
||||
*inds_++ = index_ + offset + inds[0];
|
||||
*inds_++ = index_ + offset + inds[i + 1];
|
||||
*inds_++ = index_ + offset + inds[i + 2];
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user