* 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
This commit is contained in:
parent
86be16cda4
commit
94f424f203
@ -36,6 +36,7 @@ import com.jme3.math.ColorRGBA;
|
|||||||
import com.jme3.post.SceneProcessor;
|
import com.jme3.post.SceneProcessor;
|
||||||
import com.jme3.renderer.queue.RenderQueue;
|
import com.jme3.renderer.queue.RenderQueue;
|
||||||
import com.jme3.scene.Spatial;
|
import com.jme3.scene.Spatial;
|
||||||
|
import com.jme3.scene.Geometry;
|
||||||
import com.jme3.texture.FrameBuffer;
|
import com.jme3.texture.FrameBuffer;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -290,8 +291,10 @@ public class ViewPort {
|
|||||||
throw new IllegalArgumentException( "Scene cannot be null." );
|
throw new IllegalArgumentException( "Scene cannot be null." );
|
||||||
}
|
}
|
||||||
sceneList.add(scene);
|
sceneList.add(scene);
|
||||||
|
if (scene instanceof Geometry) {
|
||||||
scene.forceRefresh(true, false, true);
|
scene.forceRefresh(true, false, true);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Detaches a scene from rendering.
|
* Detaches a scene from rendering.
|
||||||
@ -305,8 +308,10 @@ public class ViewPort {
|
|||||||
throw new IllegalArgumentException( "Scene cannot be null." );
|
throw new IllegalArgumentException( "Scene cannot be null." );
|
||||||
}
|
}
|
||||||
sceneList.remove(scene);
|
sceneList.remove(scene);
|
||||||
|
if (scene instanceof Geometry) {
|
||||||
scene.forceRefresh(true, false, true);
|
scene.forceRefresh(true, false, true);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes all attached scenes.
|
* Removes all attached scenes.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user