From 94f424f20302c3238e86d08cb0c54c3546590066 Mon Sep 17 00:00:00 2001 From: "Sha..om" Date: Mon, 23 Jul 2012 14:52:24 +0000 Subject: [PATCH] * ViewPort will only set refresh flags on scene if its a Geometry (since normally a node based scene graph would have these flags set already). git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9580 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/core/com/jme3/renderer/ViewPort.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/engine/src/core/com/jme3/renderer/ViewPort.java b/engine/src/core/com/jme3/renderer/ViewPort.java index 2c96665c2..cc09c97a0 100644 --- a/engine/src/core/com/jme3/renderer/ViewPort.java +++ b/engine/src/core/com/jme3/renderer/ViewPort.java @@ -36,6 +36,7 @@ import com.jme3.math.ColorRGBA; import com.jme3.post.SceneProcessor; import com.jme3.renderer.queue.RenderQueue; import com.jme3.scene.Spatial; +import com.jme3.scene.Geometry; import com.jme3.texture.FrameBuffer; import java.util.ArrayList; import java.util.List; @@ -290,7 +291,9 @@ public class ViewPort { throw new IllegalArgumentException( "Scene cannot be null." ); } sceneList.add(scene); - scene.forceRefresh(true, false, true); + if (scene instanceof Geometry) { + scene.forceRefresh(true, false, true); + } } /** @@ -305,7 +308,9 @@ public class ViewPort { throw new IllegalArgumentException( "Scene cannot be null." ); } sceneList.remove(scene); - scene.forceRefresh(true, false, true); + if (scene instanceof Geometry) { + scene.forceRefresh(true, false, true); + } } /**