X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbackends%2Fopengl%2Fframebuffer_backend.h;h=258db95fe9bbc0438ca01f77b95f6614a5ea444e;hb=HEAD;hp=84f6eddf2bdfcae760e0bdfbf8997cb6d882b433;hpb=160e9eea29bd10034733d59507fa1bcca36be401;p=libs%2Fgl.git diff --git a/source/backends/opengl/framebuffer_backend.h b/source/backends/opengl/framebuffer_backend.h index 84f6eddf..258db95f 100644 --- a/source/backends/opengl/framebuffer_backend.h +++ b/source/backends/opengl/framebuffer_backend.h @@ -2,29 +2,36 @@ #define MSP_GL_FRAMEBUFFER_BACKEND_H_ #include +#include #include "frameformat.h" namespace Msp { namespace GL { -class OpenGLFramebuffer +class OpenGLFramebuffer: public NonCopyable { friend class OpenGLCommands; friend class OpenGLPipelineState; protected: - unsigned id; + unsigned id = 0; + unsigned resolve_id = 0; mutable unsigned status; OpenGLFramebuffer(bool); + OpenGLFramebuffer(OpenGLFramebuffer &&); ~OpenGLFramebuffer(); - static FrameFormat get_system_format(); - static void get_system_size(unsigned &, unsigned &); + void set_system_format(const FrameFormat &); static bool is_format_supported(const FrameFormat &); + void format_changed(const FrameFormat &); static void require_layered(); + bool is_presentable() const { return id==0; } + + void resize_system(unsigned, unsigned); void update(unsigned) const; + void update(unsigned, bool) const; void require_complete() const; void set_debug_name(const std::string &);