@Override
    public void initialize(AppStateManager stateManager, Application app) {
        super.initialize(stateManager, app);

        this.application  = app;
        this.stateManager = stateManager;

        // disable annoying warnings about GUI stuff being updated, which is normal behavior
        // for late GUI placement for VR purposes
        Logger.getLogger("com.jme3").setLevel(Level.SEVERE);

        app.getCamera().setFrustumFar(fFar);
        app.getCamera().setFrustumNear(fNear);

        if( environment.isInVR() ) {
            logger.config("VR mode enabled.");

            if( environment.getVRHardware() != null ) {
                environment.getVRHardware().initVRCompositor(environment.compositorAllowed());
            } else {
                logger.warning("No VR system found.");
            }

            environment.getVRViewManager().setResolutionMultiplier(resMult);
            //inputManager.addMapping(RESET_HMD, new KeyTrigger(KeyInput.KEY_F9));
            //setLostFocusBehavior(LostFocusBehavior.Disabled);
        } else {
            logger.config("VR mode disabled.");
            //viewPort.attachScene(rootNode);
            //guiViewPort.attachScene(guiNode);
        }

        if( environment.getVRViewManager() != null ) {
            environment.getVRViewManager().initialize();
        }
    }
Set the {@link AppSettings settings} attached to this app state.
@param settings the {@link AppSettings settings} attached to this app state.
@see #getSettings()
jme3-vr/src/main/java/com/jme3/app/VRAppState.java