1 | /* |
---|
2 | Bullet Continuous Collision Detection and Physics Library |
---|
3 | Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ |
---|
4 | |
---|
5 | This software is provided 'as-is', without any express or implied warranty. |
---|
6 | In no event will the authors be held liable for any damages arising from the use of this software. |
---|
7 | Permission is granted to anyone to use this software for any purpose, |
---|
8 | including commercial applications, and to alter it and redistribute it freely, |
---|
9 | subject to the following restrictions: |
---|
10 | |
---|
11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. |
---|
12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. |
---|
13 | 3. This notice may not be removed or altered from any source distribution. |
---|
14 | */ |
---|
15 | #ifndef GLUT_STUFF_H |
---|
16 | #define GLUT_STUFF_H |
---|
17 | |
---|
18 | #ifdef WIN32//for glut.h |
---|
19 | #include <windows.h> |
---|
20 | #endif |
---|
21 | |
---|
22 | //think different |
---|
23 | #if defined(__APPLE__) && !defined (VMDMESA) |
---|
24 | #include <OpenGL/gl.h> |
---|
25 | #include <OpenGL/glu.h> |
---|
26 | #include <GLUT/glut.h> |
---|
27 | #else |
---|
28 | |
---|
29 | #include <GL/glut.h> |
---|
30 | #ifdef _WINDOWS |
---|
31 | #include <windows.h> |
---|
32 | #include <GL/gl.h> |
---|
33 | #include <GL/glu.h> |
---|
34 | #endif |
---|
35 | #endif |
---|
36 | |
---|
37 | |
---|
38 | #define BT_KEY_K 'k' |
---|
39 | #define BT_KEY_LEFT GLUT_KEY_LEFT |
---|
40 | #define BT_KEY_RIGHT GLUT_KEY_RIGHT |
---|
41 | #define BT_KEY_UP GLUT_KEY_UP |
---|
42 | #define BT_KEY_DOWN GLUT_KEY_DOWN |
---|
43 | #define BT_KEY_F1 GLUT_KEY_F1 |
---|
44 | #define BT_KEY_F2 GLUT_KEY_F2 |
---|
45 | #define BT_KEY_F3 GLUT_KEY_F3 |
---|
46 | #define BT_KEY_F4 GLUT_KEY_F4 |
---|
47 | #define BT_KEY_F5 GLUT_KEY_F5 |
---|
48 | #define BT_KEY_PAGEUP GLUT_KEY_PAGE_UP |
---|
49 | #define BT_KEY_PAGEDOWN GLUT_KEY_PAGE_DOWN |
---|
50 | #define BT_KEY_END GLUT_KEY_END |
---|
51 | #define BT_KEY_HOME GLUT_KEY_HOME |
---|
52 | #define BT_ACTIVE_ALT GLUT_ACTIVE_ALT |
---|
53 | #define BT_ACTIVE_CTRL GLUT_ACTIVE_ALT |
---|
54 | #define BT_ACTIVE_SHIFT GLUT_ACTIVE_SHIFT |
---|
55 | |
---|
56 | |
---|
57 | |
---|
58 | #if BT_USE_FREEGLUT |
---|
59 | #include "GL/freeglut_ext.h" //to be able to return from glutMainLoop() |
---|
60 | #endif |
---|
61 | |
---|
62 | |
---|
63 | |
---|
64 | class Environment; |
---|
65 | |
---|
66 | int glutmain(int argc, char **argv, Environment *env); |
---|
67 | |
---|
68 | #if defined(BT_USE_DOUBLE_PRECISION) |
---|
69 | #define btglLoadMatrix glLoadMatrixd |
---|
70 | #define btglMultMatrix glMultMatrixd |
---|
71 | #define btglColor3 glColor3d |
---|
72 | #define btglVertex3 glVertex3d |
---|
73 | #else |
---|
74 | #define btglLoadMatrix glLoadMatrixf |
---|
75 | #define btglMultMatrix glMultMatrixf |
---|
76 | #define btglColor3 glColor3f |
---|
77 | #define btglVertex3 glVertex3d |
---|
78 | #endif |
---|
79 | |
---|
80 | #endif //GLUT_STUFF_H |
---|