]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/framebuffer.h
Move swizzling modes to pixelformat.h
[libs/gl.git] / source / core / framebuffer.h
index d2029022d94b6fee2d0380d43a18dbff90338a63..920d9422fae0c103d0a492c81e9024b9f3a595ae 100644 (file)
@@ -34,7 +34,7 @@ class Framebuffer: public FramebufferBackend
 {
        friend FramebufferBackend;
 
-private:
+protected:
        struct Attachment
        {
                Texture *tex = 0;
@@ -47,9 +47,9 @@ private:
 
        FrameFormat format;
        std::vector<Attachment> attachments;
-       unsigned width;
-       unsigned height;
-       mutable unsigned dirty;
+       unsigned width = 0;
+       unsigned height = 0;
+       mutable unsigned dirty = 0;
 
        Framebuffer(bool);
 public:
@@ -72,7 +72,7 @@ public:
        unsigned get_width() const { return width; }
        unsigned get_height() const { return height; }
 
-private:
+protected:
        void update() const;
        void check_size();
        void set_attachment(FrameAttachment, Texture &, unsigned, int, unsigned);
@@ -99,8 +99,6 @@ public:
        void attach_layered(FrameAttachment attch, TextureCube &, unsigned level = 0);
        void detach(FrameAttachment attch);
 
-       void resize(const WindowView &);
-
        /** Ensures that the framebuffer is complete, throwing an exception if it
        isn't. */
        void require_complete() const;
@@ -108,8 +106,6 @@ public:
        void refresh() const { if(dirty) update(); }
 
        using FramebufferBackend::set_debug_name;
-
-       static Framebuffer &system();
 };