X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=effect_chain.h;h=3fa62ee3e074c3402843d46f0124ed3599e87ed0;hp=9622abc0eef1abf824b3b83f2c9fbdd151eef104;hb=873b60b640a96c8fb4c2d8c88c85d20e0a2dca6b;hpb=a592c55caca0fb654bad4ec43b84c46abcee21c2 diff --git a/effect_chain.h b/effect_chain.h index 9622abc..3fa62ee 100644 --- a/effect_chain.h +++ b/effect_chain.h @@ -6,7 +6,7 @@ #include "effect.h" #include "effect_id.h" -enum PixelFormat { FORMAT_RGB, FORMAT_RGBA }; +enum PixelFormat { FORMAT_RGB, FORMAT_RGBA, FORMAT_BGR, FORMAT_BGRA }; enum ColorSpace { COLORSPACE_sRGB = 0, @@ -46,11 +46,17 @@ public: void render_to_screen(unsigned char *src); private: + void normalize_to_linear_gamma(); + void normalize_to_srgb(); + unsigned width, height; ImageFormat input_format, output_format; std::vector effects; - int glsl_program_num; + bool use_srgb_texture_format; + + GLint glsl_program_num; + GLenum format, bytes_per_pixel; bool finalized; // Used during the building of the effect chain.