WindowHandler.h

Go to the documentation of this file.
00001 //------------------------------------------------------------------------------ 00004 00005 // Last Change: 2004/05/18 00006 00007 #ifndef _WINDOWHANDLER_H_ 00008 #define _WINDOWHANDLER_H_ 00009 00010 //---------------------------------------------------------------------includes- 00011 #include "../src/main.h" 00012 00013 //----------------------------------------------------------------WindowHandler- 00018 00019 class WindowHandler 00020 { 00021 protected: 00023 SDL_Surface *main_window_; 00025 GLuint screen_width_; 00027 GLuint screen_height_; 00029 GLuint screen_depth_; 00032 GLuint pixel_format_flag_; 00033 00034 public: 00035 //----------------------------------------------------------default constructor- 00039 WindowHandler() : 00040 pixel_format_flag_(0), 00041 screen_width_(800), 00042 screen_height_(600), 00043 screen_depth_(16) 00044 { 00045 } 00046 00047 //----------------------------------------------------------default constructor- 00054 WindowHandler(GLuint screen_width, GLuint screen_height, 00055 GLuint screen_depth) : 00056 screen_width_(screen_width <= 0 ? 100 : screen_width), 00057 screen_height_(screen_height <= 0 ? 100 : screen_height), 00058 screen_depth_(screen_depth <= 0 ? 16 : screen_depth) 00059 { 00060 } 00061 00062 //-------------------------------------------------------------------destructor- 00066 ~WindowHandler() 00067 { 00068 } 00069 00070 //-----------------------------------------------------------------createWindow- 00078 void createWindow(); 00079 00080 //-----------------------------------------------------initOpenGLDrawingSurface- 00084 00085 void initOpenGLDrawingSurface(); 00086 00087 //-------------------------------------------------------------------initOpenGL- 00091 void initOpenGL(); 00092 00093 //--------------------------------------------------------------resizeVideoMode- 00099 void resizeVideoMode(GLuint screen_width, GLuint screen_height); 00100 00101 //-------------------------------------------------------------toggleFullScreen- 00105 void toggleFullScreen(); 00106 00107 protected: 00108 //-----------------------------------------------------------resetupPixelFormat- 00113 void resetupPixelFormat(); 00114 }; 00115 00116 00117 #endif // _WINDOWHANDLER_H_ 00118 00119 // eof

Generated on Mon Jun 14 12:48:56 2004 for InfoVis by doxygen 1.3.7