-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
72 lines (53 loc) · 1.11 KB
/
main.cpp
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
70
71
72
#ifdef __cplusplus
#include <cstdlib>
#else
#include <stdlib.h>
#endif
#ifdef __APPLE__
#include <SDL/SDL.h>
#else
#include <SDL.h>
#endif
#include "TNRenderEngine.h"
#include "TNSDLInput.h"
#include "TNManager.h"
#include "TNArduinoInput.h"
#include <cstdlib>
#include <cstdio>
#include <unistd.h>
#include <iostream>
#include <time.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glut.h>
using namespace std;
/* screen width, height, and bit depth */
#define SCREEN_WIDTH 640
#define SCREEN_HEIGHT 480
#define SCREEN_BPP 16
/* Define our booleans */
#define TRUE 1
#define FALSE 0
int main( int argc, char **argv )
{
TNManager mgr;
TNRenderEngine re(&mgr);
TNSDLInput in(&mgr);
TNArduinoInput ar(&mgr);
ar.start();
mgr.setInput(&in);
mgr.setRenderEngine(&re);
/* initialize OpenGL */
TNCamera *cam = re.getCamera();
cam->setPitch(0);
cam->setYaw(0);
cout << "Entering event loop" << endl;
//re.bounce();
cout << "Finished event loop" << endl;
mgr.exec();
ar.stop();
ar.wait();
SDL_Quit();
/* Should never get here */
return( 0 );
}