]> git.tdb.fi Git - libs/gl.git/blob - source/backends/opengl/framebuffer_backend.h
Restructure system framebuffer and make WindowView own it
[libs/gl.git] / source / backends / opengl / framebuffer_backend.h
1 #ifndef MSP_GL_FRAMEBUFFER_BACKEND_H_
2 #define MSP_GL_FRAMEBUFFER_BACKEND_H_
3
4 #include <string>
5 #include "frameformat.h"
6
7 namespace Msp {
8 namespace GL {
9
10 class OpenGLFramebuffer
11 {
12         friend class OpenGLCommands;
13         friend class OpenGLPipelineState;
14
15 protected:
16         unsigned id;
17         mutable unsigned status;
18
19         OpenGLFramebuffer(bool);
20         ~OpenGLFramebuffer();
21
22         void set_system_format(const FrameFormat &);
23         static bool is_format_supported(const FrameFormat &);
24         static void require_layered();
25
26         void resize_system(unsigned, unsigned);
27         void update(unsigned) const;
28         void require_complete() const;
29
30         void set_debug_name(const std::string &);
31 };
32
33 using FramebufferBackend = OpenGLFramebuffer;
34
35 } // namespace GL
36 } // namespace Msp
37
38 #endif