]> git.tdb.fi Git - libs/gl.git/blobdiff - source/bloom.cpp
Get rid of the generic Texture::parameter method
[libs/gl.git] / source / bloom.cpp
index 5f2adc85c2bf592a8379d58ee9d3efc228fe055a..3993c8c901b9a01c66e621af65d6bcefc5ebc1f7 100644 (file)
@@ -75,9 +75,9 @@ Bloom::Bloom(unsigned w, unsigned h):
        for(unsigned i=0; i<2; ++i)
        {
                blur_shdata[i].uniform(loc, 0);
+               tex[i].set_min_filter(NEAREST);
                tex[i].storage(RGB16F, w, h, 0);
                tex[i].image(0, RGB, UNSIGNED_BYTE, 0);
-               tex[i].set_min_filter(NEAREST);
        }
 
        combine_shdata.uniform(combine_shader.get_uniform_location("source"), 1);
@@ -153,9 +153,8 @@ void Bloom::render(const Texture2D &src)
        src.bind_to(1);
        quad.draw();
        Program::unbind();
-       Texture::unbind();
-       TexUnit::activate(0);
-       Texture::unbind();
+       Texture::unbind_from(1);
+       Texture::unbind_from(0);
        // XXX Should check if the modes were enabled in the first place
        enable(DEPTH_TEST);
        enable(BLEND);