Fix drawing with >= 16k sprites in a spritebatch on desktops.

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2017-02-20 15:46:43 -04:00
parent 73fd45558b
commit b7dde8712a
+2 -2
View File
@@ -50,7 +50,7 @@ Buffer *QuadIndices::indexBuffer = nullptr;
char *QuadIndices::indices = nullptr; char *QuadIndices::indices = nullptr;
QuadIndices::QuadIndices(Graphics *gfx, size_t size) QuadIndices::QuadIndices(Graphics *gfx, size_t size)
: size(size) : size(size)
{ {
// The upper limit is the maximum of uint32 divided by six (the number // The upper limit is the maximum of uint32 divided by six (the number
// of indices per size) and divided by the size of uint32. This guarantees // of indices per size) and divided by the size of uint32. This guarantees
@@ -148,7 +148,7 @@ size_t QuadIndices::getIndexCount(size_t elements) const
IndexDataType QuadIndices::getType(size_t s) const IndexDataType QuadIndices::getType(size_t s) const
{ {
return vertex::getIndexDataTypeFromMax(s); return vertex::getIndexDataTypeFromMax(getIndexCount(s));
} }
size_t QuadIndices::getElementSize() size_t QuadIndices::getElementSize()