else
Blend::unbind();
- renderer.set_lighting(i->get_lighting());
+ if (const Lighting *lighting = i->get_lighting())
+ renderer.add_shader_data(lighting->get_shader_data());
renderer.set_clipping(i->get_clipping());
if(const Renderable *renderable = i->get_renderable())
if(!target_ms && samples)
target_ms = new RenderTarget(width, height, samples, fmt);
+
+#ifdef DEBUG
+ if(!debug_name.empty())
+ set_target_debug_names();
+#endif
+}
+
+void Sequence::set_debug_name(const string &name)
+{
+#ifdef DEBUG
+ debug_name = name;
+ if(!name.empty())
+ set_target_debug_names();
+#else
+ (void)name;
+#endif
+}
+
+void Sequence::set_target_debug_names()
+{
+#ifdef DEBUG
+ for(unsigned i=0; i<2; ++i)
+ if(target[i])
+ target[i]->set_debug_name(format("%s [RT:%d]", debug_name, i));
+ if(target_ms)
+ target_ms->set_debug_name(debug_name+" [RT:ms]");
+#endif
}