blob: 73db96b4bbe875fd5076b30d58f135d4485f4aa5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
#ifndef rectdrawer_h
#define rectdrawer_h
#include <GL/glew.h>
#include <vector>
#include <iostream>
#include "geoshader.hpp"
#include "graphicsobjects.hpp"
#include "spritebatch.hpp"
//merge this with spritebatch
class Rectdrawer
{
public:
Rectdrawer(GeoShader theshader);
~Rectdrawer();
//void init();
void begin();
void end();
void draw(const GraphicsData& gfxData);
void renderBatch();
private:
// Creates all the needed RenderBatches
void createRenderBatches();
GLuint _vbo;
GLuint _vao;
std::vector<GraphicsData*> _gfxPtr; ///< This is for sorting
std::vector<GraphicsData> _gfx; ///< These are the actual glyphs
std::vector<RenderBatch> _renderBatches;
GeoShader shader;
};
#endif
|