-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
glut_241.h
58 lines (47 loc) · 1.44 KB
/
glut_241.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
#ifndef GLUT_241_H
#define GLUT_241_H
#include <chrono>
#include "GL/glew.h"
#if defined (ACE_WIN32) || defined (ACE_WIN64)
#include "gl/GL.h"
#else
#include "GL/gl.h"
#endif // ACE_WIN32 || ACE_WIN64
#include "engine_common.h"
// GLUT routines
void engine_glut_241_reshape (int, int);
void engine_glut_241_key (unsigned char, int, int);
void engine_glut_241_key_special (int, int, int);
void engine_glut_241_menu (int);
void engine_glut_241_mouse_button (int, int, int, int);
void engine_glut_241_mouse_move (int, int);
void engine_glut_241_timer (int);
void engine_glut_241_draw (void);
void engine_glut_241_idle (void);
void engine_glut_241_visible (int);
struct Engine_OpenGL_GLUT_241_CBData
{
//
// canvas
int columns;
int rows;
int scaleFactor;
// shader
GLint programId;
GLint resolutionLoc;
GLint timeLoc;
GLint mouseLoc;
// time
#if defined (ACE_WIN32) || defined (ACE_WIN64)
std::chrono::steady_clock::time_point tp1;
#elif defined (ACE_LINUX)
std::chrono::time_point<std::chrono::system_clock, std::chrono::nanoseconds> tp1;
#else
#error missing implementation, aborting
#endif // ACE_WIN32 || ACE_WIN64 || ACE_LINUX
// menu
bool wireframe;
// camera
struct Engine_GL_Camera camera;
};
#endif // GLUT_241_H