00001
00002
00003 #ifndef GLAPPLICATION_H
00004 #define GLAPPLICATION_H
00005
00006
00007 #include "sdlapplication.h"
00008
00009
00010
00011
00012
00013
00014 namespace pge {
00015
00016
00017 class GLApplication : public SDLApplication {
00018 public:
00019
00020
00021
00022
00023
00024 GLApplication(int resX, int resY, int bits, bool fullscreen, const std::string &title);
00025
00026
00027
00028
00029
00030
00031
00032 virtual ~GLApplication(void);
00033
00034
00035
00036
00037
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
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
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