]> git.sesse.net Git - movit/blob - effect.h
deeaae45264fddf57a3ffd5c5a57ee3da64b732a
[movit] / effect.h
1 #ifndef _EFFECT_H
2 #define _EFFECT_H 1
3
4 #include <map>
5 #include <string>
6
7 class Effect {
8 public: 
9         virtual bool needs_linear_light() { return true; }
10         virtual bool needs_srgb_primaries() { return true; }
11         virtual bool needs_many_samples() { return false; }
12         virtual bool needs_mipmaps() { return false; }
13
14         // Neither of these take ownership.
15         bool set_int(const std::string&, int value);
16         bool set_float(const std::string &key, float value);
17         bool set_vec3(const std::string &key, const float *values);
18
19 protected:
20         // Neither of these take ownership.
21         void register_int(const std::string &key, int *value);
22         void register_float(const std::string &key, float *value);
23         void register_vec3(const std::string &key, float *values);
24         
25 private:
26         std::map<std::string, int *> params_int;
27         std::map<std::string, float *> params_float;
28         std::map<std::string, float *> params_vec3;
29 };
30
31 #endif // !defined(_EFFECT_H)