X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fframebuffer.h;fp=source%2Fframebuffer.h;h=f34ecf5c6eeea0204eaa685dfee5e7f4537e75b9;hb=357acfb941a8b5b4a6fb36e2134707d46e028d88;hp=3bf439f98cc62ca3250369abe61cdaf6c5c9de9c;hpb=aa4d25153b806a657ac3b4b0f2711f2a126f39b7;p=libs%2Fgl.git diff --git a/source/framebuffer.h b/source/framebuffer.h index 3bf439f9..f34ecf5c 100644 --- a/source/framebuffer.h +++ b/source/framebuffer.h @@ -98,10 +98,21 @@ private: void clear(); }; + struct Viewport + { + int left; + int bottom; + unsigned width; + unsigned height; + + Viewport(); + }; + unsigned id; std::vector attachments; unsigned width; unsigned height; + Viewport view; mutable unsigned dirty; Framebuffer(unsigned); @@ -131,6 +142,9 @@ public: isn't. */ void require_complete() const; + void viewport(int, int, unsigned, unsigned); + void reset_viewport(); + void clear(BufferBits); /** Blits a region from another framebuffer into this one. If the source