root.setCullMode(Spatial.CULL_NEVER);
root.setCullMode(SceneElement.CULL_NEVER);
  protected void initGame() {    Node scene = new Node("scene");    root = new Node("Root node");    t = new Torus("Torus", 50, 50, 5, 10);    t.setModelBound(new BoundingBox());    t.updateModelBound();    scene.attachChild(t);    TextureState ts = display.getRenderer().createTextureState();    ts.setEnabled(true);    ts.setTexture(        TextureManager.loadTexture(        TestBoxColor.class.getClassLoader().getResource(        "jmetest/data/texture/dirt.jpg"),        Texture.MM_LINEAR_LINEAR,        Texture.FM_LINEAR));    scene.setRenderState(ts);    ZBufferState buf = display.getRenderer().createZBufferState();    buf.setEnabled(true);    buf.setFunction(ZBufferState.CF_LEQUAL);    SpotLight am = new SpotLight();    am.setDiffuse(new ColorRGBA(0.0f, 0.0f, 1.0f, 1.0f));    am.setAmbient(new ColorRGBA(0.5f, 0.5f, 0.5f, 1.0f));    am.setDirection(new Vector3f( -250, -100, 0));    am.setLocation(new Vector3f(250, 100, 0));    am.setAngle(1);    SpotLight am2 = new SpotLight();    am2.setDiffuse(new ColorRGBA(1.0f, 0.0f, 0.0f, 1.0f));    am2.setAmbient(new ColorRGBA(0.5f, 0.5f, 0.5f, 1.0f));    am2.setDirection(new Vector3f(250, -10, 0));    am2.setLocation(new Vector3f( -250, 10, 0));    am2.setAngle(1);    DirectionalLight dr = new DirectionalLight();    dr.setDiffuse(new ColorRGBA(0.25f, 0.75f, 0.25f, 1.0f));    dr.setAmbient(new ColorRGBA(0.25f, 0.25f, 0.25f, 1.0f));    //dr.setSpecular(new ColorRGBA(1.0f, 0.0f, 0.0f, 1.0f));    dr.setDirection(new Vector3f(150, 0, 150));    LightState state = display.getRenderer().createLightState();    state.setEnabled(true);    state.attach(am);    state.attach(dr);    state.attach(am2);    am.setEnabled(true);    am2.setEnabled(true);    dr.setEnabled(true);    scene.setRenderState(state);    scene.setRenderState(buf);    root.attachChild(scene);    // --- FPS Setup ---    AlphaState as1 = display.getRenderer().createAlphaState();    as1.setBlendEnabled(true);    as1.setSrcFunction(AlphaState.SB_SRC_ALPHA);    as1.setDstFunction(AlphaState.DB_ONE);    as1.setTestEnabled(true);    as1.setTestFunction(AlphaState.TF_GREATER);    as1.setEnabled(true);    TextureState font = display.getRenderer().createTextureState();    font.setTexture(        TextureManager.loadTexture(        TestTorus.class.getClassLoader().getResource(        "jmetest/data/font/font.png"),        Texture.MM_LINEAR,        Texture.FM_LINEAR));    font.setEnabled(true);    fps = new Text("FPS counter", "");    fps.setRenderState(font);    fps.setRenderState(as1);    root.attachChild(fps);    root.setCullMode(Spatial.CULL_NEVER);    // --- End of FPS Setup ---    root.updateGeometricState(0.0f, true);    root.updateRenderState();  }