mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +02:00
Fix stale buffers being referenced by a SpriteBatch after resizing.
Fixes #2117.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user