]> git.tdb.fi Git - libs/gl.git/blobdiff - source/pipeline.cpp
Rewrite Framebuffer to defer attach/detach operations until bound
[libs/gl.git] / source / pipeline.cpp
index 54ef25a10bca8e59a123eb96322123e393595640..517037a0029785198fd724c44e5c92943f11ee82 100644 (file)
@@ -95,7 +95,6 @@ void Pipeline::add_postprocessor(PostProcessor &pp)
                depth_buf = new Renderbuffer;
                depth_buf->storage(DEPTH_COMPONENT, width, height);
                fbo->attach(DEPTH_ATTACHMENT, *depth_buf);
-               Framebuffer::unbind();
        }
 }
 
@@ -125,7 +124,7 @@ void Pipeline::render_all() const
        if(fbo)
        {
                fbo->bind();
-               clear(COLOR_BUFFER_BIT|DEPTH_BUFFER_BIT);
+               fbo->clear(COLOR_BUFFER_BIT|DEPTH_BUFFER_BIT);
        }
 
        for(vector<Effect *>::const_iterator i=effects.begin(); i!=effects.end(); ++i)