]> git.sesse.net Git - movit/blobdiff - effect_chain.h
Chain together vertex shaders, like with fragment shaders.
[movit] / effect_chain.h
index 9622abc0eef1abf824b3b83f2c9fbdd151eef104..3fa62ee3e074c3402843d46f0124ed3599e87ed0 100644 (file)
@@ -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<Effect *> 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.