Skip to content

Commit 73cf6c3

Browse files
authored
Added profile tracking to AppStateManager for render and post render. (#1485)
1 parent 29f5872 commit 73cf6c3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

+6
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,9 @@ public void render(RenderManager rm){
365365
AppState[] array = getStates();
366366
for (AppState state : array){
367367
if (state.isEnabled()) {
368+
if (app.getAppProfiler() != null) {
369+
app.getAppProfiler().appSubStep(state.getClass().getSimpleName());
370+
}
368371
state.render(rm);
369372
}
370373
}
@@ -377,6 +380,9 @@ public void postRender(){
377380
AppState[] array = getStates();
378381
for (AppState state : array){
379382
if (state.isEnabled()) {
383+
if (app.getAppProfiler() != null) {
384+
app.getAppProfiler().appSubStep(state.getClass().getSimpleName());
385+
}
380386
state.postRender();
381387
}
382388
}

0 commit comments

Comments
 (0)