@@ -1179,7 +1179,7 @@ public String getOpenCLPlatformChooser() {
11791179 }
11801180
11811181 /**
1182- * Determine if the renderer will be run in Graphics Debug mode, which means every openGL Call is checked and
1182+ * Determine if the renderer will be run in Graphics Debug mode, which means every openGL call is checked and
11831183 * if it returns an error code, throw a {@link com.jme3.renderer.RendererException}.<br />
11841184 * Without this, many openGL calls might fail without notice, so turning it on is recommended for development.
11851185 *
@@ -1191,7 +1191,7 @@ public boolean isGraphicsDebug() {
11911191 }
11921192
11931193 /**
1194- * Set whether the renderer will be run in Graphics Debug mode, which means every openGL Call is checked and
1194+ * Set whether the renderer will be run in Graphics Debug mode, which means every openGL call is checked and
11951195 * if it returns an error code, throw a {@link com.jme3.renderer.RendererException}.<br />
11961196 * Without this, many openGL calls might fail without notice, so turning it on is recommended for development.
11971197 *
@@ -1201,4 +1201,56 @@ public boolean isGraphicsDebug() {
12011201 public void setGraphicsDebug (boolean debug ) {
12021202 putBoolean ("GraphicsDebug" , debug );
12031203 }
1204+
1205+ /**
1206+ * Determine if the renderer will be run in Graphics Timing mode, which means every openGL call is checked and
1207+ * if it runs for longer than a millisecond, log it.<br />
1208+ * It also keeps track of the time spent in GL Calls in general and displays them when
1209+ * {@link com.jme3.renderer.opengl.GL#resetStats()} is called.<br />
1210+ *
1211+ * @return whether the context will be run in Graphics Timing Mode or not
1212+ * @see #setGraphicsTiming(boolean)
1213+ * @see com.jme3.renderer.opengl.GLTiming
1214+ */
1215+ public boolean isGraphicsTiming () {
1216+ return getBoolean ("GraphicsTiming" );
1217+ }
1218+
1219+ /**
1220+ * Set whether the renderer will be run in Graphics Timing mode, which means every openGL call is checked and
1221+ * if it runs for longer than a millisecond, log it.<br />
1222+ * It also keeps track of the time spent in GL Calls in general and displays them when
1223+ * {@link com.jme3.renderer.opengl.GL#resetStats()} is called.<br />
1224+ *
1225+ * @param timing whether the context will be run in Graphics Timing Mode or not
1226+ * @see #isGraphicsTiming()
1227+ * @see com.jme3.renderer.opengl.GLTiming
1228+ */
1229+ public void setGraphicsTiming (boolean timing ) {
1230+ putBoolean ("GraphicsTiming" , timing );
1231+ }
1232+
1233+ /**
1234+ * Determine if the renderer will be run in Graphics Trace mode, which means every openGL call is logged so one
1235+ * can trace what openGL commands where executed in which order by the engine.<br />
1236+ *
1237+ * @return whether the context will be run in Graphics Trace Mode or not
1238+ * @see #setGraphicsTrace(boolean)
1239+ * @see com.jme3.renderer.opengl.GLTracer
1240+ */
1241+ public boolean isGraphicsTrace () {
1242+ return getBoolean ("GraphicsTrace" );
1243+ }
1244+
1245+ /**
1246+ * Set whether the renderer will be run in Graphics Trace mode, which means every openGL call is logged so one
1247+ * can trace what openGL commands where executed in which order by the engine.<br />
1248+ *
1249+ * @param trace whether the context will be run in Graphics Trace Mode or not
1250+ * @see #isGraphicsTrace()
1251+ * @see com.jme3.renderer.opengl.GLTracer
1252+ */
1253+ public void setGraphicsTrace (boolean trace ) {
1254+ putBoolean ("GraphicsTrace" , trace );
1255+ }
12041256}
0 commit comments