- /* Binding the current object is a no-op, but this will restore the original
- FBO in case an exception is thrown. */
- Bind restore_fbo(out_fbo, true);
+ // These is a no-ops but will ensure the related state gets restored
+ BindRestore restore_fbo(out_fbo);
+ BindRestore restore_depth_test(DepthTest::current());
+ BindRestore restore_blend(Blend::current());