X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fpipeline.cpp;h=e3da053070b0cb0dcadc84e62f6b91cf4befab5a;hb=9ea7e740503b09298ae814b1bf521312d1744db2;hp=a27058effc08020ed7395645c268249a233b4f9f;hpb=aa7955f9adfab4395b00fba84fa2d7c286a83c70;p=libs%2Fgl.git diff --git a/source/pipeline.cpp b/source/pipeline.cpp index a27058ef..e3da0530 100644 --- a/source/pipeline.cpp +++ b/source/pipeline.cpp @@ -176,7 +176,8 @@ void Pipeline::render(Renderer &renderer, const Tag &tag) const setup_frame(); const Framebuffer *out_fbo = Framebuffer::current(); - // XXX Make sure the correct FBO is restored if an exception is thrown + // This is a no-op but will ensure the FBO binding gets restored + BindRestore restore_fbo(out_fbo); if(target[0]) { @@ -216,8 +217,6 @@ void Pipeline::render(Renderer &renderer, const Tag &tag) const out_fbo->bind(); postproc[i]->render(target[j]->color, target[j]->depth); } - - out_fbo->bind(); } if(!was_in_frame)