X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=demo.cpp;h=2243f2dd702b90419ef491963636c6508c76b669;hp=552380a9cf971ac984c43ebbf77708ea58bdefb2;hb=34f5f331bd3b643949ccbb0c3488af2823634d59;hpb=2463f8abd9662e08438e23e5c0d0f958ea4fe54e diff --git a/demo.cpp b/demo.cpp index 552380a..2243f2d 100644 --- a/demo.cpp +++ b/demo.cpp @@ -18,6 +18,7 @@ #include #include +#include "init.h" #include "effect.h" #include "effect_chain.h" #include "util.h" @@ -152,14 +153,16 @@ int main(int argc, char **argv) SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); SDL_SetVideoMode(WIDTH, HEIGHT, 0, SDL_OPENGL); SDL_WM_SetCaption("OpenGL window", NULL); - - // geez - glPixelStorei(GL_PACK_ALIGNMENT, 1); + init_movit(); + printf("GPU texture subpixel precision: about %.1f bits\n", + 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); EffectChain chain(WIDTH, HEIGHT); + glViewport(0, 0, WIDTH, HEIGHT); ImageFormat inout_format; inout_format.color_space = COLORSPACE_sRGB;