Переглянути джерело

Moved DetailedProfiler to a more appropriate package

Nehon 8 роки тому
батько
коміт
dc40faaff8

+ 1 - 1
jme3-core/src/main/java/com/jme3/post/DetailedProfiler.java → jme3-core/src/main/java/com/jme3/app/DetailedProfiler.java

@@ -1,4 +1,4 @@
-package com.jme3.post;
+package com.jme3.app;
 
 import com.jme3.profile.*;
 import com.jme3.renderer.Renderer;

+ 7 - 7
jme3-core/src/main/java/com/jme3/post/DetailedProfilerState.java → jme3-core/src/main/java/com/jme3/app/DetailedProfilerState.java

@@ -1,7 +1,5 @@
-package com.jme3.post;
+package com.jme3.app;
 
-import com.jme3.app.Application;
-import com.jme3.app.SimpleApplication;
 import com.jme3.app.state.BaseAppState;
 import com.jme3.font.BitmapFont;
 import com.jme3.font.BitmapText;
@@ -18,8 +16,6 @@ import java.text.DecimalFormat;
 import java.text.DecimalFormatSymbols;
 import java.util.*;
 
-import static com.jme3.post.DetailedProfiler.*;
-
 /**
  * Created by Nehon on 25/01/2017.
  */
@@ -164,7 +160,7 @@ public class DetailedProfilerState extends BaseAppState {
             }
             maxLevel = Math.max(maxLevel, path.split("/").length);
             StatLineView line = getStatLineView(path);
-            StatLine statLine = data.get(path);
+            DetailedProfiler.StatLine statLine = data.get(path);
             line.updateValues(statLine.getAverageCpu(), statLine.getAverageGpu());
             String parent = getParent(path);
             while (parent != null) {
@@ -236,12 +232,16 @@ public class DetailedProfilerState extends BaseAppState {
     public void postRender() {
         if (time > REFRESH_TIME) {
             prof.appStep(AppStep.EndFrame);
-            Map<String, StatLine> data = prof.getStats();
+            Map<String, DetailedProfiler.StatLine> data = prof.getStats();
             displayData(data);
             time = 0;
         }
     }
 
+    public Node getUiNode() {
+        return ui;
+    }
+
     private double getMsFromNs(double time) {
         return time / 1000000.0;
     }

+ 1 - 1
jme3-examples/src/main/java/jme3test/post/TestSSAO2.java

@@ -36,7 +36,7 @@ import com.jme3.light.*;
 import com.jme3.material.Material;
 import com.jme3.math.*;
 import com.jme3.post.FilterPostProcessor;
-import com.jme3.post.DetailedProfilerState;
+import com.jme3.app.DetailedProfilerState;
 import com.jme3.post.ssao.SSAOFilter;
 import com.jme3.scene.*;
 import com.jme3.scene.shape.Box;