#ifndef spritebatch_h #define spritebatch_h #include #include "graphicsdata.hpp" #include #include "geoshader.hpp" #include class RenderBatch { public: RenderBatch(GLuint Offset, GLuint NumVertices) : offset(Offset), numVertices(NumVertices){} GLuint offset; GLuint numVertices; }; class SpriteBatch { public: SpriteBatch(GeoShader theshader); ~SpriteBatch(); void init(); void begin(); void end(); void draw(const GraphicsData& gfxData); void renderBatch(); private: void createRenderBatches(); void createVertexArray(); GLuint _vbo; GLuint _vao; std::vector _gfxPtr; ///< This is for sorting std::vector _gfx; ///< These are the actual glyphs std::vector _renderBatches; GeoShader shader; }; #endif