]> git.sesse.net Git - movit/commitdiff
Fix the widget display in the demo app.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 9 Mar 2014 11:36:00 +0000 (12:36 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 9 Mar 2014 11:36:00 +0000 (12:36 +0100)
The demo app forgot to set a projection matrix, and when Movit itself
stopped setting one, the widget display broke.

demo.cpp

index 3201f1e0abcb0a729fb4cc6671a16e338bc44d15..845a776d20859b67f829ed69e5070d59cf509132 100644 (file)
--- a/demo.cpp
+++ b/demo.cpp
@@ -197,6 +197,13 @@ int main(int argc, char **argv)
        EffectChain chain(WIDTH, HEIGHT);
        glViewport(0, 0, WIDTH, HEIGHT);
 
+       glMatrixMode(GL_PROJECTION);
+       glLoadIdentity();
+       glOrtho(0.0, 1.0, 0.0, 1.0, 0.0, 1.0);
+
+       glMatrixMode(GL_MODELVIEW);
+       glLoadIdentity();
+
        ImageFormat inout_format;
        inout_format.color_space = COLORSPACE_sRGB;
        inout_format.gamma_curve = GAMMA_sRGB;