]> git.sesse.net Git - movit/blobdiff - effect_chain.cpp
Unbreak multi-phase rendering after we added the render-to-FBO functionality.
[movit] / effect_chain.cpp
index a549087862a47e5421ebe9b1a0db499911d7729b..617d1cb007f392bf6fe816c9ccbd1ead68c9722b 100644 (file)
@@ -729,7 +729,8 @@ bool EffectChain::node_needs_gamma_fix(Node *node)
        // This needs to be before everything else, since it could
        // even apply to inputs (if they are the only effect).
        if (node->outgoing_links.empty() &&
-           node->output_gamma_curve != output_format.gamma_curve) {
+           node->output_gamma_curve != output_format.gamma_curve &&
+           node->output_gamma_curve != GAMMA_LINEAR) {
                return true;
        }
 
@@ -972,7 +973,7 @@ void EffectChain::finalize()
        finalized = true;
 }
 
-void EffectChain::render_to_fbo(GLuint fbo, unsigned width, unsigned height)
+void EffectChain::render_to_fbo(GLuint dest_fbo, unsigned width, unsigned height)
 {
        assert(finalized);
 
@@ -1065,7 +1066,7 @@ void EffectChain::render_to_fbo(GLuint fbo, unsigned width, unsigned height)
                // And now the output.
                if (phase == phases.size() - 1) {
                        // Last phase goes to the output the user specified.
-                       glBindFramebuffer(GL_FRAMEBUFFER, fbo);
+                       glBindFramebuffer(GL_FRAMEBUFFER, dest_fbo);
                        check_error();
                        glViewport(x, y, width, height);
                } else {