]> git.sesse.net Git - movit/blobdiff - effect_chain.h
Remove the now obsolete load_texture().
[movit] / effect_chain.h
index c8fe11e639ed36c52b10724f72cab87af01a1540..d97ef25d1fe428f07b4e94c4a6ed3ef4b0c2ece1 100644 (file)
@@ -31,20 +31,34 @@ struct ImageFormat {
 class EffectChain {
 public:
        EffectChain(unsigned width, unsigned height);
+
+       // input, effects, output, finalize need to come in that specific order.
+
        void add_input(const ImageFormat &format);
 
-       // The pointer is owned by EffectChain.
+       // The returned pointer is owned by EffectChain.
        Effect *add_effect(EffectId effect);
 
        void add_output(const ImageFormat &format);
+       void finalize();
 
-       void render(unsigned char *src, unsigned char *dst);
+       //void render(unsigned char *src, unsigned char *dst);
+       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;
 
+       bool use_srgb_texture_format;
+
+       int glsl_program_num;
+       bool finalized;
+
+       // Used during the building of the effect chain.
        ColorSpace current_color_space;
        GammaCurve current_gamma_curve; 
 };