+ if(lights[i].light)
+ lights[i].light->update_shader_data(sd, i);
+}
+
+const ProgramData &Lighting::get_shader_data() const
+{
+ for(unsigned i=0; i<lights.size(); ++i)
+ if(lights[i].light->get_generation()!=lights[i].generation)
+ {
+ lights[i].light->update_shader_data(shdata, i);
+ lights[i].generation = lights[i].light->get_generation();
+ }
+
+ return shdata;
+}
+
+void Lighting::set_debug_name(const string &name)
+{
+#ifdef DEBUG
+ shdata.set_debug_name(name+" [UBO]");
+#else
+ (void)name;
+#endif