summaryrefslogtreecommitdiff
path: root/inc/spritebatch.hpp
diff options
context:
space:
mode:
authormajortom6 <tombarrett@siu.edu>2017-02-19 09:17:35 -0600
committerTom Barrett <tombarrett@siu.edu>2017-03-07 13:23:41 -0600
commit5c46e0f0a924989201c6784b0f956bc442f14a7e (patch)
tree33b5889b872023bd7d414f7baec45706330813b3 /inc/spritebatch.hpp
parent2cc21176467d4501adb7bfb9ee03eb9a2a7d14f2 (diff)
-removed glm library, its in the debian repos
-made opengl and sdl folders in includes, moved various *hpps to them
Diffstat (limited to 'inc/spritebatch.hpp')
-rw-r--r--inc/spritebatch.hpp63
1 files changed, 0 insertions, 63 deletions
diff --git a/inc/spritebatch.hpp b/inc/spritebatch.hpp
deleted file mode 100644
index 4379954..0000000
--- a/inc/spritebatch.hpp
+++ /dev/null
@@ -1,63 +0,0 @@
-#ifndef spritebatch_h
-#define spritebatch_h
-
-#include <GL/glew.h>
-#include "graphicsobjects.hpp"
-#include <vector>
-#include "geoshader.hpp"
-#include <iostream>
-
-
-class RenderBatch {
-public:
- RenderBatch(GLuint Offset, GLuint NumVertices) : offset(Offset),
- numVertices(NumVertices){
- }
- GLuint offset;
- GLuint numVertices;
- //GLuint texture;
-};
-
-
-class SpriteBatch
-{
- public:
- SpriteBatch(GeoShader theshader);
- ~SpriteBatch();
- // Initializes the spritebatch
- void init();
- // Begins the spritebatch
- void begin();
- // Ends the spritebatch
- void end();
- // Adds a glyph to the spritebatch
- void draw(const GraphicsData& gfxData);
- // Renders the entire SpriteBatch to the screen
- void renderBatch();
-
- private:
- // Creates all the needed RenderBatches
- void createRenderBatches();
- // Generates our VAO and VBO
- void createVertexArray();
- // Sorts glyphs according to _sortType
- //void sortGlyphs();
- // Comparators used by sortGlyphs()
- //static bool compareFrontToBack(Glyph* a, Glyph* b);
- //static bool compareBackToFront(Glyph* a, Glyph* b);
- //static bool compareTexture(Glyph* a, Glyph* b);
-
- GLuint _vbo;
- GLuint _vao;
-
- //GlyphSortType _sortType;
-
- std::vector<GraphicsData*> _gfxPtr; ///< This is for sorting
- std::vector<GraphicsData> _gfx; ///< These are the actual glyphs
- std::vector<RenderBatch> _renderBatches;
-
- GeoShader shader;
-
-};
-
-#endif