forked from drhastings/cameragl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstate.h
43 lines (39 loc) · 866 Bytes
/
state.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
#ifndef __STATE_H
#define __STATE_H
#include "GLES/gl.h"
#include "GLES2/gl2.h"
#include "EGL/egl.h"
#include "EGL/eglext.h"
typedef struct
{
uint32_t screen_width;
uint32_t screen_height;
// OpenGL|ES objects
EGLDisplay display;
EGLSurface surface;
EGLContext context;
GLuint tex;
GLuint programObject;
// model rotation vector and direction
GLfloat rot_angle_x_inc;
GLfloat rot_angle_y_inc;
GLfloat rot_angle_z_inc;
// current model rotation angles
GLfloat rot_angle_x;
GLfloat rot_angle_y;
GLfloat rot_angle_z;
// current distance from camera
GLfloat distance;
GLfloat distance_inc;
// pointers to texture buffers
char *tex_buf1;
char *tex_buf2;
char *tex_buf3;
GLuint attr_vertex;
GLuint attr_tex;
GLuint unif_tex;
GLuint unif_thresh;
GLuint unif_color;
void *eglImage;
} CUBE_STATE_T;
#endif