]> git.tdb.fi Git - libs/gl.git/blob - source/backends/opengl/device_backend.h
Create default context options in the device backend
[libs/gl.git] / source / backends / opengl / device_backend.h
1 #ifndef MSP_GL_DEVICE_BACKEND_H_
2 #define MSP_GL_DEVICE_BACKEND_H_
3
4 #include <msp/core/noncopyable.h>
5 #include <msp/graphics/glcontext.h>
6
7 namespace Msp {
8 namespace GL {
9
10 class OpenGLDevice: public NonCopyable
11 {
12 protected:
13         Graphics::GLContext context;
14
15         OpenGLDevice(Graphics::Window &, const Graphics::GLOptions &);
16
17         static Graphics::GLOptions create_default_options();
18
19         void fill_info();
20
21         Graphics::GLContext &get_context() { return context; }
22 };
23
24 using DeviceBackend = OpenGLDevice;
25 using DeviceOptions = Graphics::GLOptions;
26
27 } // namespace GL
28 } // namespace Msp
29
30 #endif