X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fframebuffer.h;h=1a13ca5bc9dbc979fa4d9bbcfcee47a1eed9e831;hb=c356a20547afae97b412da36e0b0a7d51e879401;hp=920d9422fae0c103d0a492c81e9024b9f3a595ae;hpb=24ad0788cfe20dc619669429615220061b4865ea;p=libs%2Fgl.git diff --git a/source/core/framebuffer.h b/source/core/framebuffer.h index 920d9422..1a13ca5b 100644 --- a/source/core/framebuffer.h +++ b/source/core/framebuffer.h @@ -49,6 +49,7 @@ protected: std::vector attachments; unsigned width = 0; unsigned height = 0; + unsigned layers = 0; mutable unsigned dirty = 0; Framebuffer(bool); @@ -71,6 +72,7 @@ public: unsigned get_width() const { return width; } unsigned get_height() const { return height; } + unsigned get_layers() const { return layers; } protected: void update() const; @@ -99,6 +101,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;