From: Mikko Rasa Date: Mon, 27 Sep 2010 06:43:55 +0000 (+0000) Subject: Use the Blend and DepthTest classes X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=commitdiff_plain;h=12ac9bec8e03029c1042fd7732a2cfc04c9a9584 Use the Blend and DepthTest classes --- diff --git a/source/bloom.cpp b/source/bloom.cpp index 3993c8c9..040fd6c7 100644 --- a/source/bloom.cpp +++ b/source/bloom.cpp @@ -133,8 +133,8 @@ void Bloom::render(const Texture2D &src) blur_shader.bind(); fbo.bind(); src.bind_to(0); - disable(DEPTH_TEST); - disable(BLEND); + Bind unbind_dtest(static_cast(0), true); + Bind unbind_blend(static_cast(0), true); for(unsigned i=0; i<2; ++i) { fbo.attach(COLOR_ATTACHMENT0, tex[i], 0); @@ -155,9 +155,6 @@ void Bloom::render(const Texture2D &src) Program::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); } } // namespace GL