volumeNode.attachChild(new Node());
   protected void init() {       if (initialised)           return;       initialised = true;       Renderer r = DisplaySystem.getDisplaySystem().getRenderer();       zbufferWriteLE = r.createZBufferState();       zbufferWriteLE.setWritable(true);       zbufferWriteLE.setFunction(ZBufferState.CF_LEQUAL);       zbufferWriteLE.setEnabled(true);       zbufferAlways = r.createZBufferState();       zbufferAlways.setEnabled(false);       zbufferAlways.setWritable(false);       forTesting = r.createZBufferState();       forTesting.setWritable(false);       forTesting.setFunction(ZBufferState.CF_LESS);       forTesting.setEnabled(true);       forColorPassTesting = r.createZBufferState();       forColorPassTesting.setWritable(false);       forColorPassTesting.setFunction(ZBufferState.CF_LEQUAL);       forColorPassTesting.setEnabled(true);       noStencil = r.createStencilState();       noStencil.setEnabled(false);       stencilFrontFaces = r.createStencilState();       stencilFrontFaces.setEnabled(true);       stencilFrontFaces.setStencilMask(~0);       stencilFrontFaces.setStencilFunc(StencilState.SF_ALWAYS);       stencilFrontFaces.setStencilOpFail(StencilState.SO_KEEP);       stencilFrontFaces.setStencilOpZFail(StencilState.SO_KEEP);       stencilFrontFaces.setStencilOpZPass(StencilState.SO_INCR);       stencilBackFaces = r.createStencilState();       stencilBackFaces.setEnabled(true);       stencilBackFaces.setStencilMask(~0);       stencilBackFaces.setStencilFunc(StencilState.SF_ALWAYS);       stencilBackFaces.setStencilOpFail(StencilState.SO_KEEP);       stencilBackFaces.setStencilOpZFail(StencilState.SO_KEEP);       stencilBackFaces.setStencilOpZPass(StencilState.SO_DECR);       stencilDrawOnlyWhenSet = r.createStencilState();       stencilDrawOnlyWhenSet.setEnabled(true);       stencilDrawOnlyWhenSet.setStencilMask(~0);       stencilDrawOnlyWhenSet.setStencilFunc(StencilState.SF_NOTEQUAL);       stencilDrawOnlyWhenSet.setStencilOpFail(StencilState.SO_KEEP);       stencilDrawOnlyWhenSet.setStencilOpZFail(StencilState.SO_KEEP);       stencilDrawOnlyWhenSet.setStencilOpZPass(StencilState.SO_KEEP);       stencilDrawOnlyWhenSet.setStencilRef(0);       stencilDrawWhenNotSet = r.createStencilState();       stencilDrawWhenNotSet.setEnabled(true);       stencilDrawWhenNotSet.setStencilMask(~0);       stencilDrawWhenNotSet.setStencilFunc(StencilState.SF_EQUAL);       stencilDrawWhenNotSet.setStencilOpFail(StencilState.SO_KEEP);       stencilDrawWhenNotSet.setStencilOpZFail(StencilState.SO_KEEP);       stencilDrawWhenNotSet.setStencilOpZPass(StencilState.SO_KEEP);       stencilDrawWhenNotSet.setStencilRef(0);       cullFrontFace = r.createCullState();       cullFrontFace.setEnabled(true);       cullFrontFace.setCullMode(CullState.CS_FRONT);       noCull = r.createCullState();       noCull.setEnabled(false);       noLights = r.createLightState();       noLights.setEnabled(false);       cullBackFace = r.createCullState();       cullBackFace.setEnabled(true);       cullBackFace.setCullMode(CullState.CS_BACK);       blended = r.createAlphaState();       blended.setEnabled(true);       blended.setBlendEnabled(true);       blended.setDstFunction(AlphaState.DB_ONE);       blended.setSrcFunction(AlphaState.SB_DST_COLOR);       alphaBlended = r.createAlphaState();       alphaBlended.setEnabled(true);       alphaBlended.setBlendEnabled(true);       alphaBlended.setDstFunction(AlphaState.DB_ONE_MINUS_SRC_ALPHA);       alphaBlended.setSrcFunction(AlphaState.SB_ONE);       modblended = r.createAlphaState();       modblended.setEnabled(true);       modblended.setBlendEnabled(true);       modblended.setDstFunction(AlphaState.DB_ONE_MINUS_SRC_ALPHA);       modblended.setSrcFunction(AlphaState.SB_DST_COLOR);       blendTex = r.createAlphaState();       blendTex.setEnabled(true);       blendTex.setBlendEnabled(true);       blendTex.setDstFunction(AlphaState.DB_ZERO);       blendTex.setSrcFunction(AlphaState.SB_DST_COLOR);       colorEnabled = r.createColorMaskState();       colorEnabled.setAll(true);       colorDisabled = r.createColorMaskState();       colorDisabled.setAll(false);       volumeNode.setRenderQueueMode(Renderer.QUEUE_SKIP);       volumeNode.updateRenderState();       noTexture = r.createTextureState();       noTexture.setEnabled(false);       resetShadowQuad(r);              lights = r.createLightState();       lights.setEnabled(true);       lights.setLightMask(LightState.MASK_AMBIENT | LightState.MASK_GLOBALAMBINET);   }