X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=main.cpp;h=1386a0f1def99395e9296d0ef81fa1cac29329bd;hp=287e19a681a23e11e515fa42ecd9fd415dbe5d4c;hb=a04ce272078182de6bb49e5ea9834713f3d72cae;hpb=a5f301c52c22bc29ade2a2b39f4ff3e4b10310a7 diff --git a/main.cpp b/main.cpp index 287e19a..1386a0f 100644 --- a/main.cpp +++ b/main.cpp @@ -25,7 +25,6 @@ #include "effect_chain.h" #include "util.h" #include "widgets.h" -#include "texture_enum.h" unsigned char result[WIDTH * HEIGHT * 4]; @@ -36,7 +35,7 @@ float saturation = 1.0f; float radius = 0.3f; float inner_radius = 0.3f; - + void update_hsv(Effect *lift_gamma_gain_effect, Effect *saturation_effect) { RGBTriplet lift(0.0f, 0.0f, 0.0f); @@ -157,11 +156,6 @@ int main(int argc, char **argv) glPixelStorei(GL_UNPACK_ALIGNMENT, 1); glPixelStorei(GL_PACK_ALIGNMENT, 1); - glBindTexture(GL_TEXTURE_2D, SOURCE_IMAGE); - check_error(); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - check_error(); - unsigned img_w, img_h; unsigned char *src_img = load_image("blg_wheels_woman_1.jpg", &img_w, &img_h); @@ -176,6 +170,7 @@ int main(int argc, char **argv) Effect *lift_gamma_gain_effect = chain.add_effect(EFFECT_LIFT_GAMMA_GAIN); Effect *saturation_effect = chain.add_effect(EFFECT_SATURATION); Effect *vignette_effect = chain.add_effect(EFFECT_VIGNETTE); + //chain.add_effect(EFFECT_MIRROR); chain.add_output(inout_format); chain.finalize(); @@ -258,6 +253,7 @@ int main(int argc, char **argv) update_hsv(lift_gamma_gain_effect, saturation_effect); vignette_effect->set_float("radius", radius); vignette_effect->set_float("inner_radius", inner_radius); + //vignette_effect->set_vec2("center", (float[]){ 0.7f, 0.5f }); chain.render_to_screen(src_img); glBindBuffer(GL_PIXEL_PACK_BUFFER_ARB, 1);