]> git.sesse.net Git - movit/blobdiff - effect_chain.h
Add a file-level comment for EffectChain.
[movit] / effect_chain.h
index f5064eb7b53bb8bfd8ea51919b33a4d9385649d4..407648bc9c5a6887e331d01bb4d372390509c219 100644 (file)
@@ -1,14 +1,23 @@
-#ifndef _EFFECT_CHAIN_H
-#define _EFFECT_CHAIN_H 1
-
+#ifndef _MOVIT_EFFECT_CHAIN_H
+#define _MOVIT_EFFECT_CHAIN_H 1
+
+// An EffectChain is the largest basic entity in Movit; it contains everything
+// needed to connects a series of effects, from inputs to outputs, and render
+// them. Generally you set up your effect chain once and then call its render
+// functions once per frame; setting one up can be relatively expensive,
+// but rendering is fast.
+
+#include <GL/glew.h>
+#include <stdio.h>
+#include <map>
 #include <set>
+#include <string>
 #include <vector>
 
-#include "effect.h"
 #include "image_format.h"
-#include "input.h"
 
-class EffectChain;
+class Effect;
+class Input;
 struct Phase;
 
 // For internal use within Node.
@@ -22,8 +31,8 @@ enum AlphaType {
 // Whether you want pre- or postmultiplied alpha in the output
 // (see effect.h for a discussion of pre- versus postmultiplied alpha).
 enum OutputAlphaFormat {
-       OUTPUT_ALPHA_PREMULTIPLIED,
-       OUTPUT_POSTMULTIPLIED_ALPHA,
+       OUTPUT_ALPHA_FORMAT_PREMULTIPLIED,
+       OUTPUT_ALPHA_FORMAT_POSTMULTIPLIED,
 };
 
 // A node in the graph; basically an effect and some associated information.
@@ -226,12 +235,10 @@ private:
        Effect *dither_effect;
 
        std::vector<Input *> inputs;  // Also contained in nodes.
-
-       GLuint fbo;
        std::vector<Phase *> phases;
 
        unsigned num_dither_bits;
        bool finalized;
 };
 
-#endif // !defined(_EFFECT_CHAIN_H)
+#endif // !defined(_MOVIT_EFFECT_CHAIN_H)