]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/framebuffer.h
Make framebuffer attachment accessors public
[libs/gl.git] / source / core / framebuffer.h
index fd7b8eb4d17ccffd2f829182dd55d52837187dcb..b805721640f26f5ce764cf867f689a2a9411cb69 100644 (file)
@@ -47,9 +47,9 @@ protected:
 
        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:
@@ -99,6 +99,9 @@ public:
        void attach_layered(FrameAttachment attch, TextureCube &, unsigned level = 0);
        void detach(FrameAttachment attch);
 
+       const Texture *get_attachment(FrameAttachment) const;
+       const Texture *get_attachment(unsigned) const;
+
        /** Ensures that the framebuffer is complete, throwing an exception if it
        isn't. */
        void require_complete() const;