]> git.tdb.fi Git - libs/gl.git/blobdiff - source/framebuffer.h
Remove a number of rarely used legacy features
[libs/gl.git] / source / framebuffer.h
index 3bf439f98cc62ca3250369abe61cdaf6c5c9de9c..2e29dbc3f440c7f1b9f1646e7dd611d39e977dc4 100644 (file)
@@ -40,8 +40,7 @@ enum BufferBits
 {
        COLOR_BUFFER_BIT   = GL_COLOR_BUFFER_BIT,
        DEPTH_BUFFER_BIT   = GL_DEPTH_BUFFER_BIT,
-       STENCIL_BUFFER_BIT = GL_STENCIL_BUFFER_BIT,
-       ACCUM_BUFFER_BIT   = GL_ACCUM_BUFFER_BIT
+       STENCIL_BUFFER_BIT = GL_STENCIL_BUFFER_BIT
 };
 
 enum RWBuffer
@@ -98,10 +97,21 @@ private:
                void clear();
        };
 
+       struct Viewport
+       {
+               int left;
+               int bottom;
+               unsigned width;
+               unsigned height;
+
+               Viewport();
+       };
+
        unsigned id;
        std::vector<Attachment> attachments;
        unsigned width;
        unsigned height;
+       Viewport view;
        mutable unsigned dirty;
 
        Framebuffer(unsigned);
@@ -131,6 +141,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