Fix stale buffers being referenced by a SpriteBatch after resizing.

Fixes #2117.
This commit is contained in:
Sasha Szpakowski
2024-11-09 23:33:34 -04:00
parent 43a295a7f0
commit 383fec4ea5
+3 -2
View File
@@ -256,6 +256,8 @@ void SpriteBatch::setBufferSize(int newsize)
size = newsize;
next = new_next;
attributesID.invalidate();
}
int SpriteBatch::getBufferSize() const
@@ -293,8 +295,7 @@ void SpriteBatch::attachAttribute(const std::string &name, Buffer *buffer, Mesh
attached_attributes[name] = newattrib;
// Invalidate attributes ID.
attributesID = VertexAttributesID();
attributesID.invalidate();
}
void SpriteBatch::setDrawRange(int start, int count)