]> git.tdb.fi Git - libs/gl.git/blobdiff - source/effects/bloom.cpp
Add debug name capability to more classes
[libs/gl.git] / source / effects / bloom.cpp
index af2057d908a03afa25075330ddbbfe0b2ef6f0d5..8612ec06e8e10d6ba871143bc58568336c7aa38e 100644 (file)
@@ -82,6 +82,19 @@ void Bloom::render(Renderer &renderer, const Texture2D &src, const Texture2D &)
        quad.draw(renderer);
 }
 
+void Bloom::set_debug_name(const string &name)
+{
+#ifdef DEBUG
+       for(unsigned i=0; i<2; ++i)
+               target[i]->set_debug_name(format("%s [RT:%d]", name, i));
+       common_shdata.set_debug_name(name+" [UBO:common]");
+       blur_shdata[0].set_debug_name(name+" [UBO:blur_x]");
+       blur_shdata[1].set_debug_name(name+" [UBO:blur_y]");
+#else
+       (void)name;
+#endif
+}
+
 
 Bloom::Template::Template():
        radius(2.0f),