Main Page | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals

/Users/blackie/Documents/myRepository/phobosengine-vc2005/phobosengine/phobosengine/GLApplication.h

Go to the documentation of this file.
00001 
00002 
00003 #ifndef GLAPPLICATION_H
00004 #define GLAPPLICATION_H
00005 
00006 
00007 #include "sdlapplication.h"
00008 
00009 
00010 // Define this to use the simple mainLoop of GLApplication
00011 //#define GLAPP_MAIN_LOOP 1
00012 
00013 
00014 namespace pge {
00015 
00016 
00017   class GLApplication : public SDLApplication {
00018     public:
00019       //************************************************************************
00020       //
00021       // Constructor
00022       //
00023       //************************************************************************
00024       GLApplication(int resX, int resY, int bits, bool fullscreen, const std::string &title);
00025 
00026 
00027       //************************************************************************
00028       //
00029       // Destructor
00030       //
00031       //************************************************************************
00032       virtual ~GLApplication(void);
00033 
00034 
00035       //************************************************************************
00036       //
00037       // Functions
00038       //
00039       //************************************************************************
00040       bool isWindowOpened(void);
00041 #ifdef GLAPP_MAIN_LOOP
00042       void setDelay(unsigned int delay);
00043 #endif
00044 
00045     protected:
00046       //************************************************************************
00047       //
00048       // Functions
00049       //
00050       //************************************************************************
00051 #ifdef GLAPP_MAIN_LOOP
00052       void renderCall(void);
00053       void timerCall(unsigned int delay);
00054       void mouseMotionCall(unsigned int delay, int x, int y);
00055 #endif
00056           void initCall(void);
00057       void reshapeCall(GLsizei width, GLsizei height);
00058       void keyDownCall(int key);
00059       void keyUpCall(int key);
00060       void mousePressCall(int button, int x, int y);
00061       void mouseReleaseCall(int button, int x, int y);
00062       void mainLoopCall();
00063 
00064 
00065     private:
00066       //************************************************************************
00067       //
00068       // Variables
00069       //
00070       //************************************************************************
00071       bool m_windowOK;
00072 #ifdef GLAPP_MAIN_LOOP
00073       unsigned int m_delay;
00074       unsigned int m_lastTime;
00075 #endif
00076   };
00077 };
00078 
00079 #endif

Generated on Mon Oct 16 12:08:10 2006 for Phobosengine by doxygen 1.3.4