X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=effect_chain.cpp;h=8767f7e28a2bdcfa757ae45e8b9ca3bd9f0a6570;hp=933553c7455f47df1f45268e1e771dc01f6dad3d;hb=745efab6c4ac0886c03a0387f669226d078b5386;hpb=27b42af5aa9620979a483075ff424ee943057c9d diff --git a/effect_chain.cpp b/effect_chain.cpp index 933553c..8767f7e 100644 --- a/effect_chain.cpp +++ b/effect_chain.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include @@ -1307,6 +1308,10 @@ Node *EffectChain::find_output_node() void EffectChain::finalize() { + // Save the current locale, and set it to C, so that we can output decimal + // numbers with printf and be sure to get them in the format mandated by GLSL. + char *saved_locale = setlocale(LC_NUMERIC, "C"); + // Output the graph as it is before we do any conversions on it. output_dot("step0-start.dot"); @@ -1399,6 +1404,7 @@ void EffectChain::finalize() assert(phases[0]->inputs.empty()); finalized = true; + setlocale(LC_NUMERIC, saved_locale); } void EffectChain::render_to_fbo(GLuint dest_fbo, unsigned width, unsigned height)