]> git.sesse.net Git - movit/commitdiff
Fix a narrowing conversion within {} in PaddingEffect (C++11 compatibility).
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 21 Jan 2013 21:41:18 +0000 (22:41 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 21 Jan 2013 21:41:18 +0000 (22:41 +0100)
padding_effect.cpp

index 9d6e292996f33aca18062597de166766d90a9550..2e428c4556d25bbec390fca0ad9a220e7362b86e 100644 (file)
@@ -46,14 +46,14 @@ void PaddingEffect::set_gl_state(GLuint glsl_program_num, const std::string &pre
        // than losing a pixel in the common cases of integer shift.
        // Thus the 1e-3 fudge factors.
        float texcoord_min[2] = {
        // than losing a pixel in the common cases of integer shift.
        // Thus the 1e-3 fudge factors.
        float texcoord_min[2] = {
-               (0.5f - 1e-3) / input_width,
-               (0.5f - 1e-3) / input_height
+               float((0.5f - 1e-3) / input_width),
+               float((0.5f - 1e-3) / input_height)
        };
        set_uniform_vec2(glsl_program_num, prefix, "texcoord_min", texcoord_min);
 
        float texcoord_max[2] = {
        };
        set_uniform_vec2(glsl_program_num, prefix, "texcoord_min", texcoord_min);
 
        float texcoord_max[2] = {
-               1.0f - (0.5f - 1e-3) / input_width,
-               1.0f - (0.5f - 1e-3) / input_height
+               float(1.0f - (0.5f - 1e-3) / input_width),
+               float(1.0f - (0.5f - 1e-3) / input_height)
        };
        set_uniform_vec2(glsl_program_num, prefix, "texcoord_max", texcoord_max);
 }
        };
        set_uniform_vec2(glsl_program_num, prefix, "texcoord_max", texcoord_max);
 }