From 8d841b70dd5e1614672cd2292c3beed9289b2473 Mon Sep 17 00:00:00 2001 From: "rem..om" Date: Sat, 3 Nov 2012 08:27:00 +0000 Subject: [PATCH] Forced depth range to 0,0 in NiftyJmeDisplay processor before rendering nifty to avoid depth check issues between the 3D scene and the text elements of the nifty gui. git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9941 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/niftygui/com/jme3/niftygui/NiftyJmeDisplay.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/engine/src/niftygui/com/jme3/niftygui/NiftyJmeDisplay.java b/engine/src/niftygui/com/jme3/niftygui/NiftyJmeDisplay.java index 425868831..49ba7ceb9 100644 --- a/engine/src/niftygui/com/jme3/niftygui/NiftyJmeDisplay.java +++ b/engine/src/niftygui/com/jme3/niftygui/NiftyJmeDisplay.java @@ -171,8 +171,10 @@ public class NiftyJmeDisplay implements SceneProcessor { public void postQueue(RenderQueue rq) { // render nifty before anything else renderManager.setCamera(vp.getCamera(), true); + renderer.setDepthRange(0, 0); //nifty.update(); nifty.render(false); + renderer.setDepthRange(0, 1); renderManager.setCamera(vp.getCamera(), false); }