Added SpriteBatch:setBufferSize (issue #655)

This commit is contained in:
Alex Szpakowski
2013-06-29 00:04:56 -03:00
parent 8fbf43fcc3
commit 3fb78d5458
5 changed files with 77 additions and 7 deletions
+9 -3
View File
@@ -97,6 +97,12 @@ public:
**/
int getCount() const;
/**
* Sets the total number of sprites this SpriteBatch can hold.
* Leaves existing sprite data intact when possible.
**/
void setBufferSize(int newsize);
/**
* Get the total number of sprites this SpriteBatch can hold.
**/
@@ -121,9 +127,6 @@ private:
*/
void setColorv(vertex *v, const Color &color);
static StringMap<UsageHint, USAGE_MAX_ENUM>::Entry usageHintEntries[];
static StringMap<UsageHint, USAGE_MAX_ENUM> usageHints;
Image *image;
// Max number of sprites in the batch.
@@ -141,6 +144,9 @@ private:
VertexBuffer *array_buf;
VertexIndex *element_buf;
static StringMap<UsageHint, USAGE_MAX_ENUM>::Entry usageHintEntries[];
static StringMap<UsageHint, USAGE_MAX_ENUM> usageHints;
}; // SpriteBatch
} // opengl