mirror of
https://github.com/love2d/love.git
synced 2026-08-18 11:44:15 +02:00
Removed SpriteBatch:remove(id) (reverted commit 2ca82dd)
The implementation had issues with sprite draw order when SpriteBatch:add used indices in the vertex buffer previously freed with SpriteBatch:remove
This commit is contained in:
@@ -23,7 +23,6 @@
|
||||
|
||||
// C
|
||||
#include <cstring>
|
||||
#include <deque>
|
||||
|
||||
// LOVE
|
||||
#include "common/math.h"
|
||||
@@ -64,7 +63,6 @@ public:
|
||||
|
||||
int add(float x, float y, float a, float sx, float sy, float ox, float oy, float kx, float ky, int index = -1);
|
||||
int addq(Quad *quad, float x, float y, float a, float sx, float sy, float ox, float oy, float kx, float ky, int index = -1);
|
||||
void remove(int index);
|
||||
void clear();
|
||||
|
||||
void *lock();
|
||||
@@ -127,10 +125,6 @@ private:
|
||||
VertexBuffer *array_buf;
|
||||
VertexIndex *element_buf;
|
||||
|
||||
// List of gaps in the SpriteBatch. Checked when adding sprites, and added
|
||||
// to when removing them.
|
||||
std::deque<int> gaps;
|
||||
|
||||
}; // SpriteBatch
|
||||
|
||||
} // opengl
|
||||
|
||||
Reference in New Issue
Block a user