]> git.tdb.fi Git - libs/gl.git/blobdiff - source/framebuffer.cpp
Setting depth mask off in Framebuffer is not required
[libs/gl.git] / source / framebuffer.cpp
index a0fcbc474203c5588d04e410bf4d0975c49fa983..ea28d5db2d261eeb999d1e6c05eea38b6aefe70a 100644 (file)
@@ -53,7 +53,6 @@ void Framebuffer::update_attachment(unsigned mask) const
        if(current()==this)
        {
                GLenum color_buf = GL_NONE;
-               bool has_depth = false;
                for(unsigned i=0; i<attachments.size(); ++i)
                {
                        const Attachment &attch = attachments[i];
@@ -72,12 +71,9 @@ void Framebuffer::update_attachment(unsigned mask) const
 
                        if(attch.attachment>=COLOR_ATTACHMENT0 && attch.attachment<=COLOR_ATTACHMENT3)
                                color_buf = attch.attachment;
-                       if(attch.attachment==DEPTH_ATTACHMENT)
-                               has_depth = true;
                }
 
                glDrawBuffer(color_buf);
-               glDepthMask(has_depth);
        }
        else
                dirty |= mask;