]> git.sesse.net Git - movit/blobdiff - effect_chain.cpp
Add some earlier check_error() calls so that we do not get confusing behavior if...
[movit] / effect_chain.cpp
index af0710e46a2ce6c82cd40cf9eaba7c57ed9d7a9e..4a333ea7c94ea32af0f86e7194c0631427d4be52 100644 (file)
@@ -1646,6 +1646,12 @@ void EffectChain::render_to_fbo(GLuint dest_fbo, unsigned width, unsigned height
 {
        assert(finalized);
 
+       // This needs to be set anew, in case we are coming from a different context
+       // from when we initialized.
+       check_error();
+       glDisable(GL_DITHER);
+       check_error();
+
        // Save original viewport.
        GLuint x = 0, y = 0;
 
@@ -1659,6 +1665,7 @@ void EffectChain::render_to_fbo(GLuint dest_fbo, unsigned width, unsigned height
        }
 
        // Basic state.
+       check_error();
        glDisable(GL_BLEND);
        check_error();
        glDisable(GL_DEPTH_TEST);