소스 검색

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

Trevor Flynn 4 년 전
부모
커밋
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();
             }
         }