/** * Do not call manually. * Callback from ContextListener. */ public void update(){ // Make sure the audio renderer is available to callables AudioContext.setAudioRenderer(audioRenderer); if (prof!=null) prof.appStep(AppStep.QueuedTasks); runQueuedTasks(); if (speed == 0 || paused) return; timer.update(); if (inputEnabled){ if (prof!=null) prof.appStep(AppStep.ProcessInput); inputManager.update(timer.getTimePerFrame()); } if (audioRenderer != null){ if (prof!=null) prof.appStep(AppStep.ProcessAudio); audioRenderer.update(timer.getTimePerFrame()); } // user code here.. }
inputManager.update(timer.getTimePerFrame());
/** * Do not call manually. * Callback from ContextListener. */ public void update(){ // Make sure the audio renderer is available to callables AudioContext.setAudioRenderer(audioRenderer); AppTask<?> task = taskQueue.poll(); toploop: do { if (task == null) break; while (task.isCancelled()) { task = taskQueue.poll(); if (task == null) break toploop; } task.invoke(); } while (((task = taskQueue.poll()) != null)); if (speed == 0 || paused) return; timer.update(); if (inputEnabled){ inputManager.update(timer.getTimePerFrame()); } if (audioRenderer != null){ audioRenderer.update(timer.getTimePerFrame()); } // user code here.. }
private void applicationUpdate() { AudioContext.setAudioRenderer(audioRenderer); runQueuedTasks(); if (speed == 0 || paused) { return; } timer.update(); if (inputEnabled) { inputManager.update(timer.getTimePerFrame()); } if (audioRenderer != null) { audioRenderer.update(timer.getTimePerFrame()); } }
/** * Do not call manually. * Callback from ContextListener. */ public void update(){ // Make sure the audio renderer is available to callables AudioContext.setAudioRenderer(audioRenderer); if (prof!=null) prof.appStep(AppStep.QueuedTasks); runQueuedTasks(); if (speed == 0 || paused) return; timer.update(); if (inputEnabled){ if (prof!=null) prof.appStep(AppStep.ProcessInput); inputManager.update(timer.getTimePerFrame()); } if (audioRenderer != null){ if (prof!=null) prof.appStep(AppStep.ProcessAudio); audioRenderer.update(timer.getTimePerFrame()); } // user code here.. }
@Override public void update() { simpleApplicationUpdate(); //System.out.println("tpf = " + timer.getTimePerFrame() * speed + " (" + timer.getTimePerFrame() + ", " + speed + ")"); //System.out.println("fps = " + timer.getFrameRate() / speed); if (speed == 0) { timer.update(); final float tpf = timer.getTimePerFrame(); if (inputEnabled) { inputManager.update(tpf); } guiNode.updateLogicalState(tpf); guiNode.updateGeometricState(); // render states stateManager.render(renderManager); renderManager.render(tpf, context.isRenderable()); simpleRender(renderManager); stateManager.postRender(); } }
/** * This is copied verbatim from {@link Application#update()} because we override * the {@link #update()} method and this is the only way to call the original code. */ public void applicationUpdate() { // Make sure the audio renderer is available to callables AudioContext.setAudioRenderer(audioRenderer); if (prof != null) prof.appStep(AppStep.QueuedTasks); runQueuedTasks(); if (speed == 0 || paused) return; timer.update(); if (inputEnabled) { if (prof != null) prof.appStep(AppStep.ProcessInput); inputManager.update(timer.getTimePerFrame()); } if (audioRenderer != null) { if (prof != null) prof.appStep(AppStep.ProcessAudio); audioRenderer.update(timer.getTimePerFrame()); } // user code here.. }
/** * This is copied verbatim from {@link Application#update()} because we override * the {@link #update()} method and this is the only way to call the original code. */ public void applicationUpdate() { // Make sure the audio renderer is available to callables AudioContext.setAudioRenderer(audioRenderer); if (prof != null) prof.appStep(AppStep.QueuedTasks); runQueuedTasks(); if (speed == 0 || paused) return; timer.update(); if (inputEnabled) { if (prof != null) prof.appStep(AppStep.ProcessInput); inputManager.update(timer.getTimePerFrame()); } if (audioRenderer != null) { if (prof != null) prof.appStep(AppStep.ProcessAudio); audioRenderer.update(timer.getTimePerFrame()); } // user code here.. }