X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fframebuffer.h;h=920d9422fae0c103d0a492c81e9024b9f3a595ae;hb=e70662d7812464159f2e47f4bebb69d88f89ae93;hp=d2029022d94b6fee2d0380d43a18dbff90338a63;hpb=190a7e11237351f6b730c28f7b16f183e8adc69c;p=libs%2Fgl.git diff --git a/source/core/framebuffer.h b/source/core/framebuffer.h index d2029022..920d9422 100644 --- a/source/core/framebuffer.h +++ b/source/core/framebuffer.h @@ -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 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(); };