From 940edfe9149e3409c95db7af3ae23e684dbd1354 Mon Sep 17 00:00:00 2001 From: "rem..om" Date: Tue, 1 Nov 2011 20:24:39 +0000 Subject: [PATCH] - BloomFilter, fixed background disapearance issue git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8570 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../desktop-fx/com/jme3/post/filters/BloomFilter.java | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/engine/src/desktop-fx/com/jme3/post/filters/BloomFilter.java b/engine/src/desktop-fx/com/jme3/post/filters/BloomFilter.java index 17986f285..c73a99a6a 100644 --- a/engine/src/desktop-fx/com/jme3/post/filters/BloomFilter.java +++ b/engine/src/desktop-fx/com/jme3/post/filters/BloomFilter.java @@ -90,8 +90,7 @@ public class BloomFilter extends Filter { private Material vBlurMat; private Material hBlurMat; private int screenWidth; - private int screenHeight; - private ColorRGBA backupColor; + private int screenHeight; /** * Creates a Bloom filter @@ -188,14 +187,12 @@ public class BloomFilter extends Filter { @Override protected void postQueue(RenderManager renderManager, ViewPort viewPort) { - if (glowMode != GlowMode.Scene) { - backupColor = viewPort.getBackgroundColor(); - viewPort.setBackgroundColor(ColorRGBA.Black); + if (glowMode != GlowMode.Scene) { + renderManager.getRenderer().setBackgroundColor(ColorRGBA.Black); renderManager.getRenderer().setFrameBuffer(preGlowPass.getRenderFrameBuffer()); renderManager.getRenderer().clearBuffers(true, true, true); renderManager.setForcedTechnique("Glow"); - renderManager.renderViewPortQueues(viewPort, false); - viewPort.setBackgroundColor(backupColor); + renderManager.renderViewPortQueues(viewPort, false); renderManager.setForcedTechnique(null); renderManager.getRenderer().setFrameBuffer(viewPort.getOutputFrameBuffer()); }