X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbloom.cpp;h=3993c8c901b9a01c66e621af65d6bcefc5ebc1f7;hb=abc16c5ab0fff0945d724febe9d5d3889fb8a6ce;hp=5f2adc85c2bf592a8379d58ee9d3efc228fe055a;hpb=b617c5d7b5283ad260a77f01e42e6170cabbc03d;p=libs%2Fgl.git diff --git a/source/bloom.cpp b/source/bloom.cpp index 5f2adc85..3993c8c9 100644 --- a/source/bloom.cpp +++ b/source/bloom.cpp @@ -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);