-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRenderManager.h
executable file
·61 lines (42 loc) · 977 Bytes
/
RenderManager.h
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#ifndef RENDER_MANAGER_H
#define RENDER_MANAGER_H
#ifndef __APPLE__
#include <GL/glew.h>
#include <SDL2/SDL_opengl.h>
#else
#include <OpenGL/gl3.h>
#include <OpenGL/gl3ext.h>
#include <SDL2/SDL_opengl.h>
#endif
#include "Shader.h"
#include "Vertex.h"
#include "VBO.h"
#include "Entity.h"
#include "EntityManager.h"
#include "TextureManager.h"
#include "Matrix4x4.h"
class RenderManager
{
private:
GLuint vao;
VBO quad;
VBO textureCoords;
VBO colorBuff;
Shader standardShader;
Color HexToRGB( unsigned long hex );
int OGLVersion;
bool entitiesBound;
Matrix4x4 translationMatrix;
Matrix4x4 rotationMatrix;
Matrix4x4 scaleMatrix;
Matrix4x4 modelMatrix;
Matrix4x4 viewMatrix;
Matrix4x4 projectionMatrix;
public:
RenderManager();
~RenderManager();
TextureManager* texMgr;
void load();
void renderEntities( std::vector<unsigned int> entityList, EntityManager& entityMgr );
};
#endif