source: proiecte/SIMEO/Simeo/src/SimeoGui/GlutStuff.h @ 167

Last change on this file since 167 was 167, checked in by (none), 14 years ago

Simeo: added final project and also older proof of concept code.

We used Git for version control, so look at the Git repo
in SIMEO/Simeo/ for more info.

File size: 2.4 KB
Line 
1/*
2Bullet Continuous Collision Detection and Physics Library
3Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
4
5This software is provided 'as-is', without any express or implied warranty.
6In no event will the authors be held liable for any damages arising from the use of this software.
7Permission is granted to anyone to use this software for any purpose,
8including commercial applications, and to alter it and redistribute it freely,
9subject to the following restrictions:
10
111. 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.
122. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
133. 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
64class DemoApplication;
65
66int glutmain(int argc, char **argv,int width,int height,const char* title,DemoApplication* demoApp);
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
Note: See TracBrowser for help on using the repository browser.