@Override
    public void start() {
        logger.config("Starting application...");

        // set some default settings in-case
        // settings dialog is not shown
        boolean loadSettings = false;
        if (settings == null) {
            setSettings(new AppSettings(true));
            loadSettings = true;
        }

        GraphicsDevice defDev = null;
        try {
            GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
            defDev = ge.getDefaultScreenDevice();
        } catch (Throwable e1) {
            logger.log(Level.SEVERE, "Cannot access default screen device: "+e1.getMessage(), e1);
        }

        if( isInVR() && !compositorAllowed() ) {
            logger.warning("VR Composition is not allowed.");
            // "easy extended" mode
            // TO-DO: JFrame was removed in LWJGL 3, need to use new GLFW library to pick "monitor" display of VR device
            // first, find the VR device
            GraphicsDevice VRdev = null;
            GraphicsDevice[] devs = GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices();
            // pick the display that isn't the default one
            for(GraphicsDevice gd : devs) {
                if( gd != defDev ) {
                    VRdev = gd;
                    break;
                }
            }
            // did we get the VR device?
            if( VRdev != null ) {
                // set properties for VR acceleration
                try {
                    java.awt.DisplayMode useDM = null;
                    int max = 0;
                    for(java.awt.DisplayMode dm : VRdev.getDisplayModes()) {
                        int check = dm.getHeight() + dm.getWidth() + dm.getRefreshRate() + dm.getBitDepth();
                        if( check > max ) {
                            max = check;
                            useDM = dm;
                        }
                    }
                    // create a window for the VR device
                    settings.setWidth(useDM.getWidth());
                    settings.setHeight(useDM.getHeight());
                    settings.setBitsPerPixel(useDM.getBitDepth());
                    settings.setFrequency(useDM.getRefreshRate());
                    settings.setSwapBuffers(true);
                    settings.setVSync(true); // allow vsync on this display
                    setSettings(settings);
                    //VRdev.setFullScreenWindow(VRwindow);
                    // make sure we are in the right display mode
                    if( VRdev.getDisplayMode().equals(useDM) == false ) {
                        VRdev.setDisplayMode(useDM);
                    }
                    // make a blank cursor to hide it
                    //BufferedImage cursorImg = new BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB);
                    //Cursor blankCursor = Toolkit.getDefaultToolkit().createCustomCursor(cursorImg, new Point(0, 0), "blank cursor");
                    //VRwindow.setCursor(blankCursor);
                    //jmeCanvas.getCanvas().setCursor(blankCursor);
                    //VRwindow.pack();
                    //VRwindow.setVisible(true);
                    //startCanvas();
                    logger.config("Starting application [SUCCESS]");
                    return;
                } catch(Exception e) {
                    logger.log(Level.SEVERE, "Error during application start: "+e.getMessage(), e);
                }
            }
        }

        if( !isInVR() ) {
            logger.config("VR mode disabled.");

            // not in VR, show settings dialog
            if (!JmeSystem.showSettingsDialog(settings, loadSettings)) {
                logger.config("Starting application [SUCCESS]");
                return;
            }
            

            settings.setSwapBuffers(true);
        } else {
            logger.config("VR mode enabled.");

            // use basic mirroring window, skip settings window
            settings.setWidth(xWin);
            settings.setHeight(yWin);
            settings.setBitsPerPixel(24);
            settings.setFrameRate(0); // never sleep in main loop
            settings.setFrequency(vrHardware.getDisplayFrequency());
            settings.setFullscreen(false);
            settings.setVSync(false); // stop vsyncing on primary monitor!
            settings.setSwapBuffers(!disableSwapBuffers);
            settings.setTitle("Put Headset On Now: " + settings.getTitle());
            settings.setResizable(true);
        }

        if( forceDisableMSAA ) {
            logger.config("Disabling multisampling.");
            // disable multisampling, which is more likely to break things than be useful
            settings.setSamples(1);
        }

        // set opengl mode
        if( tryOpenGL3 ) {
            logger.config("Using LWJGL OpenGL 3.2 renderer.");
            settings.setRenderer(AppSettings.LWJGL_OPENGL32);
        } else {
            logger.config("Using LWJGL OpenGL 2 renderer.");
            settings.setRenderer(AppSettings.LWJGL_OPENGL2);
        }


        setSettings(settings);
        start(JmeContext.Type.Display, false);

        // 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);
    }
Enable or disable pause on lost focus.
<p>
By default, pause on lost focus is enabled.
If enabled, the application will stop updating
when it loses focus or becomes inactive (e.g. alt-tab).
For online or real-time applications, this might not be preferable,
so this feature should be set to disabled. For other applications,
it is best to keep it on so that CPU usage is not used when
not necessary.

@param pauseOnLostFocus <code>true</code> to enable pause on lost focus, <code>false</code>
otherwise.

@see #setLostFocusBehavior(com.jme3.app.LostFocusBehavior)
jme3-vr/src/main/java/com/jme3/app/VRApplication.java