]> git.sesse.net Git - ccbs/blob - bigscreen/glwindow.h
Add a script for parsing DDRFreak's song lists.
[ccbs] / bigscreen / glwindow.h
1 #ifndef _GLWINDOW_H
2 #define _GLWINDOW_H
3
4 #ifdef WIN32
5 #include <windows.h>
6 #endif
7
8 #ifdef __linux__
9 #include <GL/glx.h>
10 #include <X11/extensions/xf86vmode.h>
11 #include <X11/keysym.h>
12 #endif
13
14 #include <GL/gl.h>
15 #include <GL/glu.h>
16
17 class GLWindow {
18 public:
19         GLWindow(char *title, int width, int height, int bpp, bool fullscreen, int zbuffer, int visual_id);
20         ~GLWindow();
21         void resize(int x, int y, int w, int h);
22         void flip();
23         bool is_done();
24
25         friend class DemoHandler;
26         friend class DirectSoundAudioDriver;
27         
28 protected:
29 #ifdef WIN32
30         HDC hDC;
31         HGLRC hRC;
32         HWND hWnd;
33         HINSTANCE hInstance;
34 #endif
35 #ifdef __linux__
36         Display *dpy;
37         int screen;
38         Window win;
39         GLXContext ctx;
40         XSetWindowAttributes attr;
41         Bool fs;
42         XF86VidModeModeInfo deskMode;
43 #endif                                              
44         
45         char *title;
46         bool fullscreen;
47         int x, y;
48         unsigned int width, height;
49         unsigned int bpp;
50         int zbuffer;
51         bool done;
52         void initGL();
53 };
54
55 #endif