diff --git a/engine/src/core/com/jme3/renderer/RenderManager.java b/engine/src/core/com/jme3/renderer/RenderManager.java index 5d69fc882..b65c193f6 100644 --- a/engine/src/core/com/jme3/renderer/RenderManager.java +++ b/engine/src/core/com/jme3/renderer/RenderManager.java @@ -650,19 +650,17 @@ public class RenderManager { scene.runControlRender(this, vp); if (scene instanceof Node) { - // recurse for all children + // Recurse for all children Node n = (Node) scene; List children = n.getChildren(); - //saving cam state for culling + // Saving cam state for culling int camState = vp.getCamera().getPlaneState(); for (int i = 0; i < children.size(); i++) { - //restoring cam state before proceeding children recusively + // Restoring cam state before proceeding children recusively vp.getCamera().setPlaneState(camState); renderScene(children.get(i), vp); - } } else if (scene instanceof Geometry) { - // add to the render queue Geometry gm = (Geometry) scene; if (gm.getMaterial() == null) { @@ -991,6 +989,10 @@ public class RenderManager { clearQueue(vp); } + public void setUsingShaders(boolean usingShaders) { + this.shader = usingShaders; + } + /** * Called by the application to render any ViewPorts * added to this RenderManager. diff --git a/engine/src/lwjgl/com/jme3/system/lwjgl/LwjglOffscreenBuffer.java b/engine/src/lwjgl/com/jme3/system/lwjgl/LwjglOffscreenBuffer.java index 05f714310..d2359732d 100644 --- a/engine/src/lwjgl/com/jme3/system/lwjgl/LwjglOffscreenBuffer.java +++ b/engine/src/lwjgl/com/jme3/system/lwjgl/LwjglOffscreenBuffer.java @@ -118,7 +118,7 @@ public class LwjglOffscreenBuffer extends LwjglContext implements Runnable { } listener.update(); - assert checkGLError(); + checkGLError(); renderer.onFrame(); @@ -135,6 +135,8 @@ public class LwjglOffscreenBuffer extends LwjglContext implements Runnable { renderer.cleanup(); pbuffer.destroy(); logger.info("Offscreen buffer destroyed."); + + super.internalDestroy(); } public void run(){