X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=effect_chain.h;h=9622abc0eef1abf824b3b83f2c9fbdd151eef104;hp=c8fe11e639ed36c52b10724f72cab87af01a1540;hb=430394b9790b9a7083aac549f607047499788710;hpb=a88f299483ffe5068cd2828513078b9103325da8 diff --git a/effect_chain.h b/effect_chain.h index c8fe11e..9622abc 100644 --- a/effect_chain.h +++ b/effect_chain.h @@ -31,20 +31,29 @@ 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: unsigned width, height; ImageFormat input_format, output_format; std::vector effects; + int glsl_program_num; + bool finalized; + + // Used during the building of the effect chain. ColorSpace current_color_space; GammaCurve current_gamma_curve; };