mirror of
https://github.com/love2d/love.git
synced 2026-08-17 11:00:31 +02:00
Slightly improved the performance of SpriteBatch:setBufferSize.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user