]> git.sesse.net Git - movit/blobdiff - demo.cpp
use the argument from command line as file to process, if present
[movit] / demo.cpp
index 5bcfa4335a2670f1784878246bdc7f8460dd81c2..cd6cf88a0286045e55782d8ca2d6a59714c8bb8b 100644 (file)
--- a/demo.cpp
+++ b/demo.cpp
@@ -159,7 +159,7 @@ int main(int argc, char **argv)
                log2(1.0f / movit_texel_subpixel_precision));
        
        unsigned img_w, img_h;
-       unsigned char *src_img = load_image("blg_wheels_woman_1.jpg", &img_w, &img_h);
+       unsigned char *src_img = load_image(argc > 1 ? argv[1] : "blg_wheels_woman_1.jpg", &img_w, &img_h);
 
        EffectChain chain(WIDTH, HEIGHT);
        glViewport(0, 0, WIDTH, HEIGHT);
@@ -178,6 +178,7 @@ int main(int argc, char **argv)
        //sandbox_effect->set_float("parm", 42.0f);
        //chain.add_effect(new MirrorEffect());
        chain.add_output(inout_format);
+       chain.set_dither_bits(8);
        chain.finalize();
 
        // generate a PBO to hold the data we read back with glReadPixels()