From dfda3f2a5e555d3173359134f4994bcd12d129f8 Mon Sep 17 00:00:00 2001 From: majortom6 Date: Fri, 3 Mar 2017 15:18:22 -0600 Subject: -removed the Graphics Data class -replaced with already implemented Rectangle, and put color and side variables in dna (can potentially remove the side variable if it does nothing important) --- inc/opengl/graphicsdata.hpp | 33 --------------------------------- inc/opengl/spritebatch.hpp | 10 +++++----- 2 files changed, 5 insertions(+), 38 deletions(-) delete mode 100644 inc/opengl/graphicsdata.hpp (limited to 'inc/opengl') diff --git a/inc/opengl/graphicsdata.hpp b/inc/opengl/graphicsdata.hpp deleted file mode 100644 index a0398dc..0000000 --- a/inc/opengl/graphicsdata.hpp +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef graphicsdata_h -#define graphicsdata_h - -class GraphicsData -{ - public: - GraphicsData(){ - this->x = 0; - this->y = 0; - this->r = 0; - this->g = 0; - this->b = 0; - this->sides = 0; - } - - GraphicsData(float x1, float y1, float r1, float g1, float b1, float sides1){ - this->x = x1; - this->y = y1; - this->r = r1; - this->g = g1; - this->b = b1; - this->sides = sides1; - } - - float x; - float y; - float r; - float g; - float b; - float sides; -}; - -#endif diff --git a/inc/opengl/spritebatch.hpp b/inc/opengl/spritebatch.hpp index 63e45eb..d1c4d7a 100644 --- a/inc/opengl/spritebatch.hpp +++ b/inc/opengl/spritebatch.hpp @@ -5,8 +5,8 @@ #include #include -#include "graphicsdata.hpp" #include "geoshader.hpp" +#include "dna.hpp" class RenderBatch { public: @@ -24,7 +24,7 @@ class SpriteBatch void init(); void begin(); void end(); - void draw(const GraphicsData& gfxData); + void draw(Rectangle r, DNA::Visuals v); void renderBatch(); private: @@ -34,9 +34,9 @@ class SpriteBatch GLuint _vbo; GLuint _vao; - std::vector _gfxPtr; - std::vector _gfx; - std::vector _renderBatches; + std::vector*> _gfxPtr; + std::vector> _gfx; + std::vector _renderBatches; GeoShader shader; }; -- cgit v1.2.3