]> git.tdb.fi Git - libs/gl.git/blob - source/backends/opengl/framebuffer_backend.h
Check the flat qualifier from the correct member
[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 <msp/core/noncopyable.h>
6 #include "frameformat.h"
7
8 namespace Msp {
9 namespace GL {
10
11 class OpenGLFramebuffer: public NonCopyable
12 {
13         friend class OpenGLCommands;
14         friend class OpenGLPipelineState;
15
16 protected:
17         unsigned id = 0;
18         unsigned resolve_id = 0;
19         mutable unsigned status;
20
21         OpenGLFramebuffer(bool);
22         OpenGLFramebuffer(OpenGLFramebuffer &&);
23         ~OpenGLFramebuffer();
24
25         void set_system_format(const FrameFormat &);
26         static bool is_format_supported(const FrameFormat &);
27         void format_changed(const FrameFormat &);
28         static void require_layered();
29
30         bool is_presentable() const { return id==0; }
31
32         void resize_system(unsigned, unsigned);
33         void update(unsigned) const;
34         void update(unsigned, bool) const;
35         void require_complete() const;
36
37         void set_debug_name(const std::string &);
38 };
39
40 using FramebufferBackend = OpenGLFramebuffer;
41
42 } // namespace GL
43 } // namespace Msp
44
45 #endif