From 12ac9bec8e03029c1042fd7732a2cfc04c9a9584 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Mon, 27 Sep 2010 06:43:55 +0000 Subject: [PATCH] Use the Blend and DepthTest classes --- source/bloom.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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 -- 2.45.2