]> git.tdb.fi Git - libs/gl.git/blobdiff - source/effects/bloom.cpp
Redesign depth and stencil test and blend state management
[libs/gl.git] / source / effects / bloom.cpp
index af2057d908a03afa25075330ddbbfe0b2ef6f0d5..6e6301151e87e02c00263b01d875d00ba8970d7d 100644 (file)
@@ -7,7 +7,6 @@
 #include "resources.h"
 #include "shader.h"
 #include "tests.h"
-#include "texunit.h"
 
 using namespace std;
 
@@ -82,6 +81,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),