X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=effect_chain.cpp;h=4a333ea7c94ea32af0f86e7194c0631427d4be52;hp=751a6be2d361839c754ab8aeec4bc6c3f049cae3;hb=15b0642fb679aabc45e6ef778d99494152f233b2;hpb=6bec5fc3abc5f57c6cddec2148626cca9a94bedf diff --git a/effect_chain.cpp b/effect_chain.cpp index 751a6be..4a333ea 100644 --- a/effect_chain.cpp +++ b/effect_chain.cpp @@ -391,7 +391,7 @@ void EffectChain::compile_glsl_program(Phase *phase) frag_shader_header += "#define YCBCR_ALSO_OUTPUT_RGBA 1\n"; } } - frag_shader.append(read_version_dependent_file("footer", "frag")); + frag_shader.append(read_file("footer.frag")); // Collect uniforms from all effects and output them. Note that this needs // to happen after output_fragment_shader(), even though the uniforms come @@ -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);