]> git.tdb.fi Git - libs/gl.git/blob - source/backends/opengl/framebuffer_backend.h
84f6eddf2bdfcae760e0bdfbf8997cb6d882b433
[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         static FrameFormat get_system_format();
23         static void get_system_size(unsigned &, unsigned &);
24         static bool is_format_supported(const FrameFormat &);
25         static void require_layered();
26
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