From 8bfe663402d8befef527f9cd88ab120acdece6e9 Mon Sep 17 00:00:00 2001 From: "PSp..om" Date: Tue, 8 May 2012 06:13:12 +0000 Subject: [PATCH] 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 --- .../com/jme3/app/state/VideoRecorderAppState.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/engine/src/desktop/com/jme3/app/state/VideoRecorderAppState.java b/engine/src/desktop/com/jme3/app/state/VideoRecorderAppState.java index 4fac4a23c..77dc63ec3 100644 --- a/engine/src/desktop/com/jme3/app/state/VideoRecorderAppState.java +++ b/engine/src/desktop/com/jme3/app/state/VideoRecorderAppState.java @@ -124,7 +124,13 @@ public class VideoRecorderAppState extends AbstractAppState { } processor = new VideoProcessor(); List 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() {