-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCube.h
51 lines (41 loc) · 893 Bytes
/
Cube.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
#ifndef __CUBE_H__
#define __CUBE_H__
#include <GL/glew.h>
#include <vector>
#include <glm/glm.hpp>
#include "Shader.h"
class Cube {
public:
Cube();
virtual ~Cube();
void render(float secondsElapsed);
private:
void checkGLError();
// OpenGL handles for uploaded model data
GLuint _transformFeedback;
GLuint _srcXfbBuff;
GLuint _destXfbBuff;
GLuint _worldPosBo[2];
GLuint _velocityBo[2];
GLuint _ageBo[2];
GLuint _particleGenVao;
GLuint _surfaceVao[2];
GLuint _indicesVbo;
GLuint _vertsVbo;
GLuint _vertQid;
GLuint _vertCount;
// Shaders
Shader _basicProg;
Shader _genProg;
Shader _surfaceProg;
// Time
float _time;
// model data
std::vector<unsigned> _indices;
std::vector<float> _verts3;
std::vector<float> _colors4;
// view data
glm::mat4 _modelViewMatrix;
glm::mat4 _projectionMatrix;
};
#endif //__CUBE_H__