]> git.tdb.fi Git - libs/gl.git/blob - source/core/device.h
6a6a76080fed875ec165622ef5b194b5a3539586
[libs/gl.git] / source / core / device.h
1 #ifndef MSP_GL_DEVICE_H_
2 #define MSP_GL_DEVICE_H_
3
4 #include <msp/graphics/window.h>
5 #include "device_backend.h"
6
7 namespace Msp {
8 namespace GL {
9
10 /**
11 Represents a graphics device.  An instance must be created to use the library.
12 */
13 class Device: public DeviceBackend
14 {
15         friend DeviceBackend;
16
17 private:
18         static Device *current;
19
20 public:
21         Device(Graphics::Window &, const DeviceOptions & = DeviceOptions());
22         ~Device();
23
24         using DeviceBackend::get_context;
25
26         static Device &get_current();
27 };
28
29 } // namespace GL
30 } // namespace Msp
31
32 #endif