Kaynağa Gözat

Fixed the video recorder app state to attach itself
to the last _enabled_ view instead of just the last
view.
Fixed the internal IsoTimer to report the proper
resolution. It was reporting picoseconds when it
is actually returning milliseconds. This manifested
itself as a stuck g_Time in my shaders because time
was creeping along so slowly (if at all... I'm not
sure float has enough resolution to measure
1 / 1000000000 resolution.


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9357 75d07b2b-3a1a-0410-a2c5-0572b91ccdca

PSp..om 13 yıl önce
ebeveyn
işleme
8bfe663402

+ 8 - 2
engine/src/desktop/com/jme3/app/state/VideoRecorderAppState.java

@@ -124,7 +124,13 @@ public class VideoRecorderAppState extends AbstractAppState {
         }
         processor = new VideoProcessor();
         List<ViewPort> vps = app.getRenderManager().getPostViews();
-        lastViewPort = vps.get(vps.size()-1);
+
+        for (int i = vps.size() - 1; i >= 0; i-- ) {
+            lastViewPort = vps.get(i);
+            if (lastViewPort.isEnabled()) {
+                break;
+            }
+        }
         lastViewPort.addProcessor(processor);
     }
 
@@ -256,7 +262,7 @@ public class VideoRecorderAppState extends AbstractAppState {
         }
 
         public long getResolution() {
-            return 1000000000L;
+            return 1000L;
         }
 
         public float getFrameRate() {