]> git.tdb.fi Git - libs/gl.git/blobdiff - source/framebuffer.cpp
Enforce unbinding as well as binding buffers
[libs/gl.git] / source / framebuffer.cpp
index 8f54020009586cd5b20e97f64a7faa14d2327e17..672495182f7f641bbf419c2ea5b35dd28af6c28e 100644 (file)
@@ -213,7 +213,7 @@ void Framebuffer::detach(FramebufferAttachment attch)
 
 FramebufferStatus Framebuffer::check_status() const
 {
-       Bind _bind(this, true);
+       BindRestore _bind(this);
        return static_cast<FramebufferStatus>(glCheckFramebufferStatus(GL_FRAMEBUFFER));
 }
 
@@ -226,7 +226,7 @@ void Framebuffer::require_complete() const
 
 void Framebuffer::clear(BufferBits bits)
 {
-       Bind _bind(this, true);
+       BindRestore _bind(this);
        glClear(bits);
 }
 
@@ -279,7 +279,7 @@ void Framebuffer::bind() const
 }
 
 const Framebuffer *Framebuffer::current()
-{      
+{
        if(!cur_obj)
                cur_obj = &system();
        return cur_obj;