#ifndef spritebatch_h #define spritebatch_h #include #include #include #include "geoshader.hpp" #include "dna.hpp" class RenderBatch { public: RenderBatch(GLuint Offset, GLuint NumVertices) : offset(Offset), numVertices(NumVertices){} GLuint offset; GLuint numVertices; }; class SpriteBatch { public: SpriteBatch(GeoShader theshader); void init(); void begin(); void end(); void draw(Rectangle r, DNA::Visuals v); void renderBatch(); private: void createRenderBatches(); void createVertexArray(); GLuint _vbo; GLuint _vao; std::vector*> _gfxPtr; std::vector> _gfx; std::vector _renderBatches; GeoShader shader; }; #endif