]> git.tdb.fi Git - libs/gui.git/blob - source/gbase/glcontext.h
Add SimpleWindow and SimpleGLWindow
[libs/gui.git] / source / gbase / glcontext.h
1 /* $Id$
2
3 This file is part of libmspgbase
4 Copyright © 2007-2008  Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
6 */
7
8 #ifndef MSP_GBASE_GLCONTEXT_H_
9 #define MSP_GBASE_GLCONTEXT_H_
10
11 namespace Msp {
12 namespace Graphics {
13
14 class Display;
15 class Window;
16
17 struct GLOptions
18 {
19         bool alpha;
20         bool stencil;
21         bool doublebuffer;
22         unsigned multisample;
23
24         GLOptions();
25 };
26
27 class GLContext
28 {
29 private:
30         struct Private;
31
32         Display &display;
33         Window &window;
34         Private *priv;
35
36 public:
37         GLContext(Window &wnd, const GLOptions &opts=GLOptions());
38         ~GLContext();
39
40         void swap_buffers();
41 private:
42         void window_resized(unsigned, unsigned);
43 };
44
45 } // namespace Graphics
46 } // namespace Msp
47
48 #endif