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])
{
out_fbo->bind();
postproc[i]->render(target[j]->color, target[j]->depth);
}
-
- out_fbo->bind();
}
if(!was_in_frame)