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:
Alex Szpakowski
2013-02-24 09:47:03 -04:00
parent 7d579308dc
commit 1d34dda48b
4 changed files with 8 additions and 93 deletions
@@ -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