-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
42 lines (29 loc) · 806 Bytes
/
main.cpp
File metadata and controls
42 lines (29 loc) · 806 Bytes
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
#include <GL/glut.h>
#include "include/controller.h"
//!THE MEMBER ACCESS THING
controller ctrl;
void main_display_hypercube();
void main_keyboard_relay(unsigned char k, int x, int y);
void main_idle();
int main(int argc, char **argv){
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGBA | GLUT_DEPTH);
glutInitWindowPosition(0, 0);
glutInitWindowSize(600, 600);
glutCreateWindow("4D VISUALIZER");
ctrl.initialize_renderer();
glutDisplayFunc(main_display_hypercube);
glutKeyboardFunc(main_keyboard_relay);
glutIdleFunc(main_idle);
glutMainLoop();
return 0;
}
void main_display_hypercube(){
ctrl.display_hypercube();
}
void main_keyboard_relay(unsigned char k, int x, int y){
ctrl.keyboard_function(k, x, y);
}
void main_idle(){
ctrl.idle();
}