X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fpipeline.cpp;h=e3da053070b0cb0dcadc84e62f6b91cf4befab5a;hp=a27058effc08020ed7395645c268249a233b4f9f;hb=e1f9db7e8550d5c9629ac5ad0e2f8dc2dd4efa8d;hpb=7da609f539040d11cccc61b838f4b74e06135552 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)