#include <map>
#include <string>
+#include <GL/gl.h>
+
+// Can alias on a float[3].
+struct RGBTriplet {
+ RGBTriplet(float r, float g, float b)
+ : r(r), g(g), b(b) {}
+
+ float r, g, b;
+};
+
+// Convenience functions that deal with prepending the prefix..
+void set_uniform_float(GLhandleARB glsl_program_num, const std::string &prefix, const std::string &key, float value);
+void set_uniform_vec3(GLhandleARB glsl_program_num, const std::string &prefix, const std::string &key, const float *values);
+
class Effect {
public:
virtual bool needs_linear_light() { return true; }
virtual bool needs_many_samples() { return false; }
virtual bool needs_mipmaps() { return false; }
+ virtual std::string output_convenience_uniforms();
+ virtual std::string output_glsl() = 0;
+
+ virtual void set_uniforms(GLhandleARB glsl_program_num, const std::string& prefix);
+
// Neither of these take ownership.
bool set_int(const std::string&, int value);
bool set_float(const std::string &key, float value);