ZBufferState buf = display.getRenderer().createZBufferState();
buf.setEnabled(true);
buf.setFunction(ZBufferState.TestFunction.LessThanOrEqualTo);
rootNode.setRenderState(buf);
PointLight light = new PointLight();
light.setDiffuse(new ColorRGBA(0.75f, 0.75f, 1.0f, 0.75f));
light.setAmbient(new ColorRGBA(0.1f, 0.1f, 0.1f, 1.0f));
light.setLocation(new Vector3f(40, 40, 40));
light.setEnabled(true);
PointLight light2 = new PointLight();
light2.setDiffuse(new ColorRGBA(1.0f, 0.0f, 0.0f, 0.0f));
light2.setAmbient(new ColorRGBA(0.0f, 0.0f, 0.0f, 1.0f));
light2.setLocation(new Vector3f(-140, -140, -140));
light2.setEnabled(true);
light2.setShadowCaster(true);
lightState = display.getRenderer().createLightState();
lightState.setEnabled(true);
lightState.attach(light);
lightState.attach(light2);