Slightly improved the performance of SpriteBatch:setBufferSize.

This commit is contained in:
Alex Szpakowski
2014-09-18 18:30:56 -03:00
parent 417173b43a
commit 5dda0c08eb
4 changed files with 32 additions and 29 deletions
+3 -5
View File
@@ -26,13 +26,13 @@
// LOVE
#include "common/math.h"
#include "common/Object.h"
#include "common/Matrix.h"
#include "common/StringMap.h"
#include "graphics/Drawable.h"
#include "graphics/Volatile.h"
#include "graphics/Color.h"
#include "graphics/Quad.h"
#include "VertexBuffer.h"
namespace love
{
@@ -43,8 +43,6 @@ namespace opengl
// Forward declarations.
class Texture;
class VertexBuffer;
class VertexIndex;
class SpriteBatch : public Drawable
{
@@ -68,7 +66,7 @@ public:
void flush();
void setTexture(Texture *newtexture);
Texture *getTexture();
Texture *getTexture() const;
/**
* Set the current color for this SpriteBatch. The sprites added
@@ -139,7 +137,7 @@ private:
Color *color;
VertexBuffer *array_buf;
VertexIndex *element_buf;
VertexIndex element_buf;
// The portion of the vertex buffer that's been modified while mapped.
size_t buffer_used_offset;