]> git.tdb.fi Git - libs/gui.git/blob - source/glwindow.h
Initial revision
[libs/gui.git] / source / glwindow.h
1 /* $Id$
2
3 This file is part of libmspgbase
4 Copyright © 2007 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
6 */
7
8 #ifndef MSP_GBASE_GLWINDOW_H_
9 #define MSP_GBASE_GLWINDOW_H_
10
11 #include <GL/glx.h>
12 #include "window.h"
13
14 namespace Msp {
15
16 struct GLDisplayOptions
17 {
18         bool alpha;
19         bool doublebuffer;
20         unsigned multisample;
21
22         GLDisplayOptions();
23 };
24
25 class GLWindow: public Window
26 {
27 protected:
28         typedef GLXContext Context;
29
30         GLDisplayOptions gl_options;
31         Context context;
32
33 public:
34         GLWindow(unsigned, unsigned);
35         GLWindow(const DisplayOptions &, const GLDisplayOptions &);
36         ~GLWindow();
37
38         void swap_buffers();
39 protected:
40         void init();
41 };
42
43 } // namespace Msp
44
45 #endif