Pass the limit on the number of indices to generate to BuildDrawingParams.

This commit is contained in:
Henrik Rydgård committed 2024-01-15 10:09:04 +01:00
1 parent cf5d76faf5
commit db94b0b696
8 files changed
+24 -19

No files matched your search

+1 -1
View File
@@ -499,7 +499,7 @@ public:
// If we're only using a subset of verts, it's better to decode with random access (usually.)
// However, if we're reusing a lot of verts, we should read and cache them.
useCache_ = useIndices_ && vertex_count > (upperBound_ - lowerBound_ + 1);
if (useCache_ && cached_.size() < upperBound_ - lowerBound_ + 1)
if (useCache_ && (int)cached_.size() < upperBound_ - lowerBound_ + 1)
cached_.resize(std::max(128, upperBound_ - lowerBound_ + 1));
}