00001
00002
00003
00004
00005
00006 #ifndef GLWINDOW_H
00007 #define GLWINDOW_H
00008
00009 #include<Frame.h>
00010
00011 #include<windows.h>
00012 #include<render.h>
00013
00014 class Font;
00015 class Dialog;
00016
00030 class GLWindow : public Frame
00031 {
00032 DYNAMIC_OBJECT;
00033 public:
00035 GLWindow(const string &t = "");
00036
00038 virtual ~GLWindow();
00039
00041 void setZBufferBits(short z) {
00042 zBits = z;
00043 }
00044
00046 bool create();
00047
00049 void quit();
00050
00052 void swapBuffers() {
00053 SwapBuffers(hDC);
00054 }
00055
00057 bool getFullscreen() {
00058 return fs;
00059 }
00060
00062 void fullscreen(bool flag);
00063
00065 void refreshChildren();
00066
00068 bool translateEvent(UINT uMsg, WPARAM wParam, LPARAM lParam, Event &event);
00069
00070
00071 void refresh();
00072 void resize(unsigned short w, unsigned short h);
00073
00074
00075 void parseSymbol(Token &t, ObjectFile &file);
00076 void writeParams(ostream &stream);
00077
00078 protected:
00080 virtual void initGL();
00081
00083 string title;
00084
00085 private:
00086 typedef Frame super;
00087
00088
00089 void createSymbols();
00090
00092 bool fs;
00093
00095 short zBits;
00096
00098 Font *font;
00099
00101 HDC hDC;
00102
00104 HGLRC hRC;
00105
00107 HWND hWnd;
00108
00110 HINSTANCE hInstance;
00111 };
00112 #endif