private void toggleDepth() {
        int depthBits = settings.getDepthBits();
        depthBits = (depthBits == 24) ? 16 : 24;
        System.out.println("depthBits = " + depthBits);
        settings.setDepthBits(depthBits);
        setSettings(settings);

        restart();
    }
Restart the app, requesting a different number of bits per pixel in the
depth buffer.
jme3-examples/src/main/java/jme3test/renderer/TestIssue798.java