1 #ifndef MSP_GL_FRAMEBUFFER_BACKEND_H_
2 #define MSP_GL_FRAMEBUFFER_BACKEND_H_
5 #include <msp/core/noncopyable.h>
6 #include "frameformat.h"
11 class OpenGLFramebuffer: public NonCopyable
13 friend class OpenGLCommands;
14 friend class OpenGLPipelineState;
18 unsigned resolve_id = 0;
19 mutable unsigned status;
21 OpenGLFramebuffer(bool);
22 OpenGLFramebuffer(OpenGLFramebuffer &&);
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();
30 bool is_presentable() const { return id==0; }
32 void resize_system(unsigned, unsigned);
33 void update(unsigned) const;
34 void update(unsigned, bool) const;
35 void require_complete() const;
37 void set_debug_name(const std::string &);
40 using FramebufferBackend = OpenGLFramebuffer;