-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathglut_228.h
69 lines (58 loc) · 1.86 KB
/
glut_228.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
62
63
64
65
66
67
68
69
#ifndef GLUT_228_H
#define GLUT_228_H
#if defined (GLEW_SUPPORT)
#include "GL/glew.h"
#endif // GLEW_SUPPORT
#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"
// other functions
void addBall (struct Engine_OpenGL_GLUT_228_CBData&, float, float, float);
void updateBalls (struct Engine_OpenGL_GLUT_228_CBData&);
void clear (struct Engine_OpenGL_GLUT_228_CBData&);
// GLUT routines
void engine_glut_228_reshape (int, int);
void engine_glut_228_key (unsigned char, int, int);
void engine_glut_228_key_special (int, int, int);
void engine_glut_228_menu (int);
void engine_glut_228_mouse_button (int, int, int, int);
void engine_glut_228_mouse_move (int, int);
void engine_glut_228_timer (int);
void engine_glut_228_draw (void);
void engine_glut_228_idle (void);
void engine_glut_228_visible (int);
struct Engine_OpenGL_GLUT_228_CBData
{
//
std::vector<float> ballsX;
std::vector<float> ballsY;
std::vector<float> radii;
std::vector<float> velocX;
std::vector<float> velocY;
float distScale;
float colorOffset;
// canvas
int columns;
int rows;
int scaleFactor;
// shader
GLint programId;
GLint ballsXLoc;
GLint ballsYLoc;
GLint radiiLoc;
GLint ballsLoc;
GLint distScaleLoc;
GLint colorOffsetLoc;
GLint widthLoc;
GLint heightLoc;
// menu
bool wireframe;
// camera
struct Engine_GL_Camera camera;
// mouse
bool leftButtonIsDown;
};
#endif // GLUT_228_H