]> git.tdb.fi Git - libs/gl.git/blobdiff - source/backends/opengl/windowview_backend.h
Restructure system framebuffer and make WindowView own it
[libs/gl.git] / source / backends / opengl / windowview_backend.h
diff --git a/source/backends/opengl/windowview_backend.h b/source/backends/opengl/windowview_backend.h
new file mode 100644 (file)
index 0000000..f51c4bb
--- /dev/null
@@ -0,0 +1,27 @@
+#ifndef MSP_GL_WINDOWVIEW_BACKEND_H_
+#define MSP_GL_WINDOWVIEW_BACKEND_H_
+
+#include "systemframebuffer.h"
+#include "view.h"
+
+namespace Msp {
+namespace GL {
+
+class OpenGLWindowView: public View
+{
+protected:
+       OpenGLSystemFramebuffer sys_framebuf;
+
+       OpenGLWindowView() = default;
+
+       virtual const Framebuffer &get_target() const { return sys_framebuf; }
+
+       void resize_framebuffer(unsigned, unsigned);
+};
+
+using WindowViewBackend = OpenGLWindowView;
+
+} // namespace GL
+} // namespace Msp
+
+#endif