+}
+
+void TexEnv::set_mode(TexEnvMode m)
+{
+ mode = m;
+ update_parameter(MODE);
+}
+
+void TexEnv::set_color(const Color &c)
+{
+ color = c;
+ update_parameter(COLOR);
+}
+
+void TexEnv::bind_to(unsigned i) const
+{
+ TexUnit &unit = TexUnit::get_unit(i);
+ if(unit.set_texenv(this))
+ {
+ unit.bind();
+ update_parameter(-1);