-
Notifications
You must be signed in to change notification settings - Fork 1
/
SimpleScenegraph.h
54 lines (40 loc) · 1.06 KB
/
SimpleScenegraph.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
/* EGLBenchmark
*
* Author: Jarkko Vatjus-Anttila <[email protected]>
*
* For conditions of distribution and use, see copyright notice in license.txt
*/
#ifndef SimpleScenegraph_H
#define SimpleScenegraph_H
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
#include <EGL/egl.h>
#include <string>
#include <vector>
#include "GLWrapper.h"
#include "SimpleMesh.h"
#include "SimpleTexture.h"
#include "SimpleShader.h"
// Class definition
class SimpleScenegraph
{
public:
SimpleScenegraph();
~SimpleScenegraph();
public:
bool initScenegraph(unsigned int w, unsigned int h);
void setCameraLocation(GLfloat x, GLfloat y, GLfloat z);
void setCameraDelta(GLfloat x, GLfloat y, GLfloat z);
/* File I/O */
bool fromFile(const char *filename);
void render(void);
protected:
private:
SimpleShader *ss;
std::vector <SimpleMesh *> v_sm;
//std::vector <SimpleTexture *> v_st;
// Matrix uniform and camera coords
GLfloat camera_x, camera_y, camera_z;
unsigned int w_width, w_height;
};
#endif // SimpleScenegraph_H