* Depth writes now completely disabled for all nifty elements - should fix various glitches when nifty is rendered with jME3 gui or 3D objects
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9981 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
9e03dba566
commit
b3e63e9732
@ -77,6 +77,13 @@ public class RenderDeviceJme implements RenderDevice {
|
||||
private Matrix4f tempMat = new Matrix4f();
|
||||
private ColorRGBA tempColor = new ColorRGBA();
|
||||
|
||||
private static final RenderState noZWriteState = new RenderState();
|
||||
|
||||
static {
|
||||
noZWriteState.setDepthTest(false);
|
||||
noZWriteState.setDepthWrite(false);
|
||||
}
|
||||
|
||||
private static class CachedTextKey {
|
||||
|
||||
BitmapFont font;
|
||||
@ -156,6 +163,7 @@ public class RenderDeviceJme implements RenderDevice {
|
||||
}
|
||||
|
||||
public void beginFrame() {
|
||||
rm.setForcedRenderState(noZWriteState);
|
||||
}
|
||||
|
||||
public void endFrame() {
|
||||
@ -163,6 +171,7 @@ public class RenderDeviceJme implements RenderDevice {
|
||||
textCacheLastFrame = textCacheCurrentFrame;
|
||||
textCacheCurrentFrame = temp;
|
||||
textCacheCurrentFrame.clear();
|
||||
rm.setForcedRenderState(null);
|
||||
}
|
||||
|
||||
public int getWidth() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user