diff options
author | Sven Gothel <[email protected]> | 2011-12-23 03:33:30 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-12-23 03:33:30 +0100 |
commit | 3f5df93484a2ea97c6e51a717f05d9ddcec64d84 (patch) | |
tree | 33d6bbed9029c4c9fabc4db023d20162a82096cb /src/test/com/jogamp | |
parent | c6fca0edc9f092a8f08f14f6ad128b62c6227c6e (diff) |
Screen: width/height reflects virtual Screen size (-> big-desktop)
Add updateScreenSize() utilizing new getNativeScreenSizeImpl() to set/update the virtual Screen size.
This replaces setScreenSize() where the ScreenMode dimension was being used
which doesn't reflect the virtual size.
ScreenMode Test Impact:
We cannot assertEquals(sm.getRotatedWidth(), screen.getWidth()),
since ScreenMode size != virtual size.
Diffstat (limited to 'src/test/com/jogamp')
-rw-r--r-- | src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode00NEWT.java | 7 | ||||
-rw-r--r-- | src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode01NEWT.java | 12 |
2 files changed, 1 insertions, 18 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode00NEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode00NEWT.java index 7bd421234..a5b7a76e7 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode00NEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode00NEWT.java @@ -38,15 +38,12 @@ import org.junit.Test; import com.jogamp.newt.Display; import com.jogamp.newt.NewtFactory; import com.jogamp.newt.Screen; -import com.jogamp.newt.Window; import com.jogamp.newt.ScreenMode; -import com.jogamp.newt.opengl.GLWindow; import com.jogamp.newt.util.MonitorMode; import com.jogamp.newt.util.ScreenModeUtil; import com.jogamp.opengl.test.junit.util.UITestCase; import java.util.Iterator; import java.util.List; -import javax.media.nativewindow.Capabilities; import javax.media.nativewindow.util.Dimension; import javax.media.nativewindow.util.DimensionImmutable; import javax.media.nativewindow.util.SurfaceSize; @@ -67,7 +64,7 @@ public class TestScreenMode00NEWT extends UITestCase { height = 480; } - // @Test + @Test public void testScreenModeInfo00() throws InterruptedException { DimensionImmutable res = new Dimension(640, 480); SurfaceSize surfsz = new SurfaceSize(res, 32); @@ -119,8 +116,6 @@ public class TestScreenMode00NEWT extends UITestCase { System.err.println("curr SM: "+sm_c); System.err.println("curr sz: "+screen.getWidth()+"x"+screen.getHeight()); Assert.assertEquals(sm_o, sm_c); - Assert.assertEquals(sm_c.getRotatedWidth(), screen.getWidth()); - Assert.assertEquals(sm_c.getRotatedHeight(), screen.getHeight()); screen.removeReference(); diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode01NEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode01NEWT.java index b05b5ad59..c3c68e46c 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode01NEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode01NEWT.java @@ -200,8 +200,6 @@ public class TestScreenMode01NEWT extends UITestCase { Assert.assertNotNull(smOrig); Assert.assertEquals(smCurrent, smOrig); System.err.println("[0] current/orig: "+smCurrent); - Assert.assertEquals(smCurrent.getRotatedWidth(), screen.getWidth()); - Assert.assertEquals(smCurrent.getRotatedHeight(), screen.getHeight()); screenModes = ScreenModeUtil.filterByRate(screenModes, smOrig.getMonitorMode().getRefreshRate()); Assert.assertNotNull(screenModes); @@ -222,8 +220,6 @@ public class TestScreenMode01NEWT extends UITestCase { screen.setCurrentScreenMode(sm); Assert.assertEquals(sm, screen.getCurrentScreenMode()); Assert.assertNotSame(smOrig, screen.getCurrentScreenMode()); - Assert.assertEquals(sm.getRotatedWidth(), screen.getWidth()); - Assert.assertEquals(sm.getRotatedHeight(), screen.getHeight()); Thread.sleep(waitTimeLong); @@ -253,8 +249,6 @@ public class TestScreenMode01NEWT extends UITestCase { Assert.assertNotNull(smCurrent); Assert.assertEquals(smCurrent, smOrig); - Assert.assertEquals(smCurrent.getRotatedWidth(), screen.getWidth()); - Assert.assertEquals(smCurrent.getRotatedHeight(), screen.getHeight()); screen.destroy(); @@ -288,8 +282,6 @@ public class TestScreenMode01NEWT extends UITestCase { Assert.assertNotNull(smOrig); Assert.assertEquals(smCurrent, smOrig); System.err.println("[0] current/orig: "+smCurrent); - Assert.assertEquals(smCurrent.getRotatedWidth(), screen.getWidth()); - Assert.assertEquals(smCurrent.getRotatedHeight(), screen.getHeight()); List<ScreenMode> screenModes = screen.getScreenModes(); if(screenModes.size()==1) { @@ -316,8 +308,6 @@ public class TestScreenMode01NEWT extends UITestCase { System.err.println("[0] set current: "+screenMode); screen.setCurrentScreenMode(screenMode); - Assert.assertEquals(screenMode.getRotatedWidth(), screen.getWidth()); - Assert.assertEquals(screenMode.getRotatedHeight(), screen.getHeight()); if(!preFS) { System.err.println("[0] set FS post 0: "+window.isFullscreen()); @@ -354,8 +344,6 @@ public class TestScreenMode01NEWT extends UITestCase { Assert.assertNotNull(smCurrent); Assert.assertEquals(smCurrent, smOrig); - Assert.assertEquals(smCurrent.getRotatedWidth(), screen.getWidth()); - Assert.assertEquals(smCurrent.getRotatedHeight(), screen.getHeight()); screen.destroy(); } |