SpriteBatch is now Volatile and can deal with display resolution changes.

This commit is contained in:
rude
2009-08-18 18:43:59 +02:00
parent c52c218ba1
commit d58182c4c2
2 changed files with 35 additions and 6 deletions
+6 -1
View File
@@ -30,6 +30,7 @@
#include <common/Vector.h>
#include <common/Matrix.h>
#include <graphics/Drawable.h>
#include <graphics/Volatile.h>
// OpenGL
#include "GLee.h"
@@ -45,7 +46,7 @@ namespace opengl
class Image;
class Quad;
class SpriteBatch : public Drawable
class SpriteBatch : public Drawable, public Volatile
{
private:
@@ -84,6 +85,10 @@ namespace opengl
SpriteBatch(Image * image, int size, int usage);
virtual ~SpriteBatch();
// Implements Volatile.
bool loadVolatile();
void unloadVolatile();
void add(float x, float y, float a, float sx, float sy, float ox, float oy);
void addq(Quad * quad, float x, float y, float a, float sx, float sy, float ox, float oy);
void clear();