diff --git a/src/java/com/threerings/jme/JmeApp.java b/src/java/com/threerings/jme/JmeApp.java index f845d8cea..fc29a1ef1 100644 --- a/src/java/com/threerings/jme/JmeApp.java +++ b/src/java/com/threerings/jme/JmeApp.java @@ -129,13 +129,6 @@ public class JmeApp _root.updateGeometricState(0f, true); _root.updateRenderState(); - // create and add our statistics display - if (displayStatistics()) { - _stats = new StatsDisplay(_display.getRenderer()); - _stats.updateGeometricState(0f, true); - _stats.updateRenderState(); - } - return true; } catch (Throwable t) { @@ -144,6 +137,21 @@ public class JmeApp } } + /** + * Configures whether or not we display FPS and other statistics atop the + * display. + */ + public void displayStatistics (boolean display) + { + if (display && (_stats == null)) { + _stats = new StatsDisplay(_display.getRenderer()); + _stats.updateGeometricState(0f, true); + _stats.updateRenderState(); + } else if (!display && (_stats != null)) { + _stats = null; + } + } + /** * Starts up the main rendering and event processing loop. This method * will not return until the application is terminated with a call to @@ -456,15 +464,6 @@ public class JmeApp System.exit(0); } - /** - * If true we'll display some renderer statistics at the bottom of the - * screen. - */ - protected boolean displayStatistics () - { - return false; - } - /** * Prepends the necessary bits onto the supplied path to properly * locate it in our configuration directory.