Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members

demowindow.h

00001 /***************************************************************************
00002                           demowindow.h  -  description
00003                              -------------------
00004     begin                : Thu May 22 2003
00005     copyright            : (C) 2003 by Jacques Gasselin de Richebourg
00006     email                : jacquesgasselin@hotmail.com
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU Lesser General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  *   This library is distributed in the hope that it will be useful,       *
00017  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00018  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
00019  *   Lesser General Public License for more details.                       *
00020  *                                                                         *
00021  *   You should have received a copy of the GNU Lesser General Public      *
00022  *   License along with this library; if not, write to the Free Software   *
00023  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA *
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

Generated on Wed Feb 4 23:11:33 2004 by doxygen 1.3.3