]> git.sesse.net Git - movit/blobdiff - effect_chain.h
Redo the phase generation; we now start at the output end instead of at the inputs...
[movit] / effect_chain.h
index 855c3f52bf2b308c8090e384df8f9779f5aab23e..91b8e29f2c5fe12b5405e9778a3a3c948fab1d01 100644 (file)
@@ -63,10 +63,11 @@ private:
        struct Phase {
                GLint glsl_program_num;
                bool input_needs_mipmaps;
-               std::vector<Effect *> inputs;
+               std::vector<Effect *> inputs;   // Only from other phases; input textures are not counted here.
                std::vector<Effect *> effects;  // In order.
        };
 
+       void set_use_srgb_texture_format(Effect *effect);
        Effect *normalize_to_linear_gamma(Effect *input);
        Effect *normalize_to_srgb(Effect *input);
 
@@ -77,11 +78,12 @@ private:
 
        // Create all GLSL programs needed to compute the given effect, and all outputs
        // that depends on it (whenever possible).
-       void construct_glsl_programs(Effect *start, std::set<Effect *> *completed_effects);
+       void construct_glsl_programs(Effect *output);
 
        unsigned width, height;
        ImageFormat output_format;
        std::vector<Effect *> effects;
+       std::vector<Input *> inputs;  // Also contained in effects.
        std::map<Effect *, std::string> effect_ids;
        std::map<Effect *, GLuint> effect_output_textures;
        std::map<Effect *, std::vector<Effect *> > outgoing_links;