-
Notifications
You must be signed in to change notification settings - Fork 0
/
globals.hpp
28 lines (22 loc) · 849 Bytes
/
globals.hpp
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
// This file contains all of global variables of this program.
// All of the variables here should contain an explanation
// about why the variables were allowed to have global scope.
#include "Camera.hpp"
#include "RigidBody.hpp"
#ifdef __APPLE__
#include <OpenGL/gl.h>
#include <OpenGL/glu.h>
#endif
#ifdef __gnu_linux__
#include <GL/gl.h>
#include <GL/glu.h>
#endif
// glut's display routine requires the camera as an argument to the
// display() callback. display() doesn't support arguments so having
// a global camera is the only way to do this.
extern Camera cam;
// Same issue with display as with camera. RigidBody needs to be able
// to respond to keyboard callbacks but is updated from display function.
extern RigidBody body;
// display needs to access to shaderprogram which is initialised in main
extern GLuint shaderprogram;