diff --git a/jme3-core/src/main/java/com/jme3/system/AppSettings.java b/jme3-core/src/main/java/com/jme3/system/AppSettings.java index 4f4fd6213..bdd983ae6 100644 --- a/jme3-core/src/main/java/com/jme3/system/AppSettings.java +++ b/jme3-core/src/main/java/com/jme3/system/AppSettings.java @@ -1179,7 +1179,7 @@ public final class AppSettings extends HashMap { } /** - * Determine if the renderer will be run in Graphics Debug mode, which means every openGL Call is checked and + * Determine if the renderer will be run in Graphics Debug mode, which means every openGL call is checked and * if it returns an error code, throw a {@link com.jme3.renderer.RendererException}.
* Without this, many openGL calls might fail without notice, so turning it on is recommended for development. * @@ -1191,7 +1191,7 @@ public final class AppSettings extends HashMap { } /** - * Set whether the renderer will be run in Graphics Debug mode, which means every openGL Call is checked and + * Set whether the renderer will be run in Graphics Debug mode, which means every openGL call is checked and * if it returns an error code, throw a {@link com.jme3.renderer.RendererException}.
* Without this, many openGL calls might fail without notice, so turning it on is recommended for development. * @@ -1201,4 +1201,56 @@ public final class AppSettings extends HashMap { public void setGraphicsDebug(boolean debug) { putBoolean("GraphicsDebug", debug); } + + /** + * Determine if the renderer will be run in Graphics Timing mode, which means every openGL call is checked and + * if it runs for longer than a millisecond, log it.
+ * It also keeps track of the time spent in GL Calls in general and displays them when + * {@link com.jme3.renderer.opengl.GL#resetStats()} is called.
+ * + * @return whether the context will be run in Graphics Timing Mode or not + * @see #setGraphicsTiming(boolean) + * @see com.jme3.renderer.opengl.GLTiming + */ + public boolean isGraphicsTiming() { + return getBoolean("GraphicsTiming"); + } + + /** + * Set whether the renderer will be run in Graphics Timing mode, which means every openGL call is checked and + * if it runs for longer than a millisecond, log it.
+ * It also keeps track of the time spent in GL Calls in general and displays them when + * {@link com.jme3.renderer.opengl.GL#resetStats()} is called.
+ * + * @param timing whether the context will be run in Graphics Timing Mode or not + * @see #isGraphicsTiming() + * @see com.jme3.renderer.opengl.GLTiming + */ + public void setGraphicsTiming(boolean timing) { + putBoolean("GraphicsTiming", timing); + } + + /** + * Determine if the renderer will be run in Graphics Trace mode, which means every openGL call is logged so one + * can trace what openGL commands where executed in which order by the engine.
+ * + * @return whether the context will be run in Graphics Trace Mode or not + * @see #setGraphicsTrace(boolean) + * @see com.jme3.renderer.opengl.GLTracer + */ + public boolean isGraphicsTrace() { + return getBoolean("GraphicsTrace"); + } + + /** + * Set whether the renderer will be run in Graphics Trace mode, which means every openGL call is logged so one + * can trace what openGL commands where executed in which order by the engine.
+ * + * @param trace whether the context will be run in Graphics Trace Mode or not + * @see #isGraphicsTrace() + * @see com.jme3.renderer.opengl.GLTracer + */ + public void setGraphicsTrace(boolean trace) { + putBoolean("GraphicsTrace", trace); + } }