Skip to content

Commit 4a597c3

Browse files
committed
Fixing stray triangles under some circumstances for sphere prim. Fixes #1810
1 parent 55c0eb9 commit 4a597c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cinder/GeomIo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2022,7 +2022,7 @@ size_t Sphere::getNumIndices() const
20222022
{
20232023
int numRings, numSegments;
20242024
numRingsAndSegments( &numRings, &numSegments );
2025-
return numSegments * numRings * 6;
2025+
return (numSegments - 1) * (numRings - 1) * 6;
20262026
}
20272027

20282028
uint8_t Sphere::getAttribDims( Attrib attr ) const

0 commit comments

Comments
 (0)