Просмотр исходного кода

Added profile tracking to AppStateManager for render and post render. (#1485)

Trevor Flynn 4 лет назад
Родитель
Сommit
73cf6c32fb
1 измененных файлов с 6 добавлено и 0 удалено
  1. 6 0
      jme3-core/src/main/java/com/jme3/app/state/AppStateManager.java

+ 6 - 0
jme3-core/src/main/java/com/jme3/app/state/AppStateManager.java

@@ -365,6 +365,9 @@ public class AppStateManager {
         AppState[] array = getStates();
         for (AppState state : array){
             if (state.isEnabled()) {
+                if (app.getAppProfiler() != null) {
+                    app.getAppProfiler().appSubStep(state.getClass().getSimpleName());
+                }
                 state.render(rm);
             }
         }
@@ -377,6 +380,9 @@ public class AppStateManager {
         AppState[] array = getStates();
         for (AppState state : array){
             if (state.isEnabled()) {
+                if (app.getAppProfiler() != null) {
+                    app.getAppProfiler().appSubStep(state.getClass().getSimpleName());
+                }
                 state.postRender();
             }
         }