X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fbloom.cpp;h=b74bde80f970dd16f597452963a3863b7e2e50d3;hp=b9e626989e1e585def0f45395cf6e5ff7ac1f016;hb=ac7c744dfb6e87481eea7081b84c5ae2f585ee7b;hpb=83bf78244e92ca6731edd8075f158fcec6e53027 diff --git a/source/bloom.cpp b/source/bloom.cpp index b9e62698..b74bde80 100644 --- a/source/bloom.cpp +++ b/source/bloom.cpp @@ -7,8 +7,11 @@ Distributed under the LGPL #include #include +#include "blend.h" #include "bloom.h" #include "meshbuilder.h" +#include "misc.h" +#include "tests.h" #include "texunit.h" using namespace std; @@ -130,6 +133,8 @@ void Bloom::render(const Texture2D &src) blur_shader.bind(); fbo.bind(); src.bind_to(0); + disable(DEPTH_TEST); + disable(BLEND); for(unsigned i=0; i<2; ++i) { fbo.attach(COLOR_ATTACHMENT0, tex[i], 0); @@ -151,6 +156,9 @@ void Bloom::render(const Texture2D &src) Texture::unbind(); TexUnit::activate(0); Texture::unbind(); + // XXX Should check if the modes were enabled in the first place + enable(DEPTH_TEST); + enable(BLEND); } } // namespace GL