summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--make/scripts/tests.sh3
-rw-r--r--src/newt/classes/com/jogamp/newt/opengl/util/stereo/StereoDeviceUtil.java11
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/stereo/StereoDemo01.java3
3 files changed, 13 insertions, 4 deletions
diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh
index ed9d85896..aa2cbc778 100644
--- a/make/scripts/tests.sh
+++ b/make/scripts/tests.sh
@@ -414,8 +414,7 @@ function testawtswt() {
#
# Stereo
#
-testnoawt com.jogamp.oculusvr.OVRVersion $*
-#testnoawt com.jogamp.opengl.test.junit.jogl.stereo.StereoDemo01 $*
+testnoawt com.jogamp.opengl.test.junit.jogl.stereo.StereoDemo01 $*
#
# HiDPI
diff --git a/src/newt/classes/com/jogamp/newt/opengl/util/stereo/StereoDeviceUtil.java b/src/newt/classes/com/jogamp/newt/opengl/util/stereo/StereoDeviceUtil.java
index 762608fd4..24eba6ec1 100644
--- a/src/newt/classes/com/jogamp/newt/opengl/util/stereo/StereoDeviceUtil.java
+++ b/src/newt/classes/com/jogamp/newt/opengl/util/stereo/StereoDeviceUtil.java
@@ -72,7 +72,10 @@ public class StereoDeviceUtil {
final Screen screen = NewtFactory.createScreen(display, 0);
screen.addReference();
final MonitorDevice monitor = screen.getMainMonitor(rect);
- if( adjustRotation && 0 != deviceReqRotation ) {
+ System.err.println("StereoDevice Monitor: "+monitor);
+ final MonitorMode currentMode = monitor.getCurrentMode();
+ if( adjustRotation && deviceReqRotation != currentMode.getRotation() ) {
+ System.err.println("StereoDevice Current Mode: "+currentMode+", requires rotation: "+deviceReqRotation);
final DimensionImmutable deviceRotRes;
if( 90 == deviceReqRotation || 270 == deviceReqRotation ) {
deviceRotRes = new Dimension(deviceRes.getHeight(), deviceRes.getWidth());
@@ -83,8 +86,12 @@ public class StereoDeviceUtil {
final List<MonitorMode> mmodes1 = MonitorModeUtil.filterByResolution(mmodes0, deviceRotRes);
final List<MonitorMode> mmodes2 = MonitorModeUtil.filterByRotation(mmodes1, deviceReqRotation);
if( mmodes2.size() > 0 ) {
- monitor.setCurrentMode(mmodes2.get(0));
+ final MonitorMode newMode = mmodes2.get(0);
+ System.err.println("StereoDevice Set Mode: "+newMode);
+ monitor.setCurrentMode(newMode);
}
+ } else {
+ System.err.println("StereoDevice Keeps Mode: "+currentMode);
}
return monitor;
}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/stereo/StereoDemo01.java b/src/test/com/jogamp/opengl/test/junit/jogl/stereo/StereoDemo01.java
index 39ca85527..37c7d0e1a 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/stereo/StereoDemo01.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/stereo/StereoDemo01.java
@@ -352,6 +352,9 @@ public class StereoDemo01 {
System.err.println("Window.0.windowSize : "+window.getWidth()+" x "+window.getHeight());
System.err.println("Window.0.surfaceSize: "+window.getSurfaceWidth()+" x "+window.getSurfaceHeight());
window.setSurfaceSize(deviceRes.getWidth(), deviceRes.getHeight());
+ if( useStereoScreen ) {
+ window.setPosition(devicePos.getX(), devicePos.getY());
+ }
System.err.println("Window.1.windowSize : "+window.getWidth()+" x "+window.getHeight());
System.err.println("Window.1.surfaceSize: "+window.getSurfaceWidth()+" x "+window.getSurfaceHeight());