]> git.tdb.fi Git - libs/gl.git/blobdiff - source/backends/opengl/device_backend.h
Create a Device class to hold the graphics context
[libs/gl.git] / source / backends / opengl / device_backend.h
diff --git a/source/backends/opengl/device_backend.h b/source/backends/opengl/device_backend.h
new file mode 100644 (file)
index 0000000..e64352d
--- /dev/null
@@ -0,0 +1,26 @@
+#ifndef MSP_GL_DEVICE_BACKEND_H_
+#define MSP_GL_DEVICE_BACKEND_H_
+
+#include <msp/core/noncopyable.h>
+#include <msp/graphics/glcontext.h>
+
+namespace Msp {
+namespace GL {
+
+class OpenGLDevice: public NonCopyable
+{
+protected:
+       Graphics::GLContext context;
+
+       OpenGLDevice(Graphics::Window &, const Graphics::GLOptions &);
+
+       Graphics::GLContext &get_context() { return context; }
+};
+
+using DeviceBackend = OpenGLDevice;
+using DeviceOptions = Graphics::GLOptions;
+
+} // namespace GL
+} // namespace Msp
+
+#endif