9 // Can alias on a float[3].
11 RGBTriplet(float r, float g, float b)
17 // Convenience functions that deal with prepending the prefix..
18 void set_uniform_float(GLhandleARB glsl_program_num, const std::string &prefix, const std::string &key, float value);
19 void set_uniform_vec3(GLhandleARB glsl_program_num, const std::string &prefix, const std::string &key, const float *values);
23 virtual bool needs_linear_light() { return true; }
24 virtual bool needs_srgb_primaries() { return true; }
25 virtual bool needs_many_samples() { return false; }
26 virtual bool needs_mipmaps() { return false; }
28 virtual std::string output_convenience_uniforms();
29 virtual std::string output_glsl() = 0;
31 virtual void set_uniforms(GLhandleARB glsl_program_num, const std::string& prefix);
33 // Neither of these take ownership.
34 bool set_int(const std::string&, int value);
35 bool set_float(const std::string &key, float value);
36 bool set_vec3(const std::string &key, const float *values);
39 // Neither of these take ownership.
40 void register_int(const std::string &key, int *value);
41 void register_float(const std::string &key, float *value);
42 void register_vec3(const std::string &key, float *values);
45 std::map<std::string, int *> params_int;
46 std::map<std::string, float *> params_float;
47 std::map<std::string, float *> params_vec3;
50 #endif // !defined(_EFFECT_H)