Backported commits 145524a and 7785b4b from minor into default (Added SpriteBatch:flush, deprecated SpriteBatch:bind/unbind, SpriteBatch:flush is called implicitly when the spritebatch is drawn.)

This commit is contained in:
Alex Szpakowski
2014-06-17 21:52:56 -03:00
parent b9cd93e071
commit f0fa63ba47
6 changed files with 104 additions and 84 deletions
+5 -2
View File
@@ -65,8 +65,7 @@ public:
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 clear();
void *lock();
void unlock();
void flush();
void setTexture(Texture *newtexture);
Texture *getTexture();
@@ -142,6 +141,10 @@ private:
VertexBuffer *array_buf;
VertexIndex *element_buf;
// The portion of the vertex buffer that's been modified while mapped.
size_t buffer_used_offset;
size_t buffer_used_size;
static StringMap<UsageHint, USAGE_MAX_ENUM>::Entry usageHintEntries[];
static StringMap<UsageHint, USAGE_MAX_ENUM> usageHints;