-void Material::set_diffuse(const Color &d)
-{
- diffuse = d;
- shdata.uniform("material.diffuse", diffuse);
- update_parameter(DIFFUSE);
-}
-
-void Material::set_specular(const Color &s)
-{
- specular = s;
- shdata.uniform("material.specular", specular);
- update_parameter(SPECULAR);
-}
-
-void Material::set_emission(const Color &e)
-{
- emission = e;
- shdata.uniform("material.emission", emission);
- update_parameter(EMISSION);
-}
+ shprog = new Program(create_program_source());
+ try
+ {
+ coll.add(name, shprog);
+ }
+ catch(...)
+ {
+ delete shprog;
+ throw;
+ }