00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef DEMOWINDOW_H
00028 #define DEMOWINDOW_H
00029
00030 #ifdef WITH_GLUT
00031 #include "gluttglwindow.h"
00032 #elif WITH_SDL
00033 #include "sdltglwindow.h"
00034 #elif WITH_GLX
00035 #include "glxtglwindow.h"
00036 #elif WITH_ALLEGGL
00037 #include "alleggltglwindow.h"
00038 #endif
00039
00040 #include <functional>
00041 #include <algorithm>
00042 #include <vector>
00043
00044 using namespace std;
00045 using namespace GLScene;
00049 typedef enum { DW_ROTATE, DW_ZOOM, DW_PAN } DWMenum;
00050
00051 class DemoWindow :
00052 #ifdef WITH_GLUT
00053 public GLUTTGLWindow
00054 #elif WITH_SDL
00055 public SDLTGLWindow
00056 #elif WITH_GLX
00057 public GLXTGLWindow
00058 #elif WITH_ALLEGGL
00059 public AllegglTGLWindow
00060 #endif
00061 {
00062 GLImage* tempImg;
00063 GLImage screenshot;
00064 GLRenderMode renderMode;
00065 GLScene::CameraPtr myCamera;
00066 int mx, my;
00067 DWMenum mouseState;
00068 bool targetMode;
00069
00070 unsigned frameCounter;
00071 unsigned framesGone;
00072 clock_t clocksGone;
00073
00074 public:
00075 DemoWindow();
00076 virtual ~DemoWindow();
00077
00078 virtual void init();
00079
00080 virtual void display();
00081 virtual void mouse(int, int, int, int);
00082 virtual void keyboard(unsigned char, int, int);
00083 virtual void motion(int, int);
00084
00085 virtual void idle();
00086 };
00087
00088 #endif