diff options
Diffstat (limited to 'inc/opengl')
| -rw-r--r-- | inc/opengl/graphicsdata.hpp | 33 | ||||
| -rw-r--r-- | inc/opengl/spritebatch.hpp | 10 | 
2 files changed, 5 insertions, 38 deletions
| 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 <vector>
  #include <GL/glew.h>
 -#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<GraphicsData*> _gfxPtr; 
 -                std::vector<GraphicsData> _gfx; 
 -                std::vector<RenderBatch> _renderBatches;
 +                std::vector<std::pair<Rectangle,DNA::Visuals>*> _gfxPtr; 
 +                std::vector<std::pair<Rectangle,DNA::Visuals>>  _gfx; 
 +                std::vector<RenderBatch>                        _renderBatches;
                  GeoShader shader;
  };
 | 
