@Override
    public void update() {
        // Make sure the audio renderer is available to callables
        AudioContext.setAudioRenderer(audioRenderer);

        runQueuedTasks();

        if (speed != 0 && !paused) {

            timer.update();

            if (inputEnabled){
                inputManager.update(timer.getTimePerFrame());
            }

            if (audioRenderer != null){
                audioRenderer.update(timer.getTimePerFrame());
            }
        }

        if (speed == 0 || paused) {
            try {
                Thread.sleep(50); // throttle the CPU when paused
            } catch (InterruptedException ex) {
                Logger.getLogger(SimpleApplication.class.getName()).log(Level.SEVERE, null, ex);
            }
            return;
        }

        float tpf = timer.getTimePerFrame() * speed;

        // update states
        stateManager.update(tpf);

        // simple update and root node
        simpleUpdate(tpf);


        // render states
        stateManager.render(renderManager);

        // update VR pose & cameras
        if( viewManager != null ) {
            viewManager.update(tpf);
        } else if( observer != null ) {
            getCamera().setFrame(observer.getWorldTranslation(), observer.getWorldRotation());
        }

        //FIXME: check if this code is necessary.
        // Updates scene and gui states.
        rootNode.updateLogicalState(tpf);
        guiNode.updateLogicalState(tpf);

        rootNode.updateGeometricState();

        if( isInVR() == false || guiManager.getPositioningMode() == VRGUIPositioningMode.MANUAL ) {
            // Update geometric state here only if GUI is in manual mode, or not in VR.
            // Otherwise it will get updated automatically in the view-manager update.
            guiNode.updateGeometricState();
        }

        renderManager.render(tpf, context.isRenderable());
        simpleRender(renderManager);
        stateManager.postRender();

        // update compositor?
        if( viewManager != null ) {
            viewManager.postRender();
        }
    }
Runs tasks enqueued via {@link #enqueue(Callable)}
jme3-vr/src/main/java/com/jme3/app/VRApplication.java