aboutsummaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-10-09 01:59:33 +0200
committerSven Gothel <[email protected]>2014-10-09 01:59:33 +0200
commit39bed561a04dab457663aaa651e9c9f1f7c12270 (patch)
treea20ee180a314eeb1d61564bfc12af38483f79591 /src/test
parent1d623bfc9db124414f6b64a0ce72308c7757b049 (diff)
Newt Screen viewport in windows units: Add missing setup in overriden calcVirtualScreenOriginAndSize(..) method (duplicate pixel unit)
Diffstat (limited to 'src/test')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode00aNEWT.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode00aNEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode00aNEWT.java
index 68a08b8de..860560658 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode00aNEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode00aNEWT.java
@@ -29,6 +29,7 @@
package com.jogamp.opengl.test.junit.newt.mm;
import java.io.IOException;
+
import javax.media.nativewindow.NativeWindowFactory;
import org.junit.Assert;
@@ -48,9 +49,11 @@ import com.jogamp.opengl.test.junit.util.UITestCase;
import java.util.Iterator;
import java.util.List;
+
import javax.media.nativewindow.util.Dimension;
import javax.media.nativewindow.util.DimensionImmutable;
import javax.media.nativewindow.util.Rectangle;
+import javax.media.nativewindow.util.RectangleImmutable;
import javax.media.nativewindow.util.SurfaceSize;
import javax.media.opengl.GLProfile;
@@ -192,6 +195,21 @@ public class TestScreenMode00aNEWT extends UITestCase {
Assert.assertNotNull(sm_c);
Assert.assertEquals(sm_o, sm_c);
}
+
+ final RectangleImmutable zero = new Rectangle();
+
+ final Rectangle monitorViewPU = new Rectangle();
+ final Rectangle monitorViewWU = new Rectangle();
+ MonitorDevice.unionOfViewports(monitorViewPU, monitorViewWU, monitors);
+ System.err.println("Test.0: Monitor union viewport: "+monitorViewPU+" [pu] / "+monitorViewWU+" [wu]");
+ Assert.assertNotEquals(zero, monitorViewPU);
+ Assert.assertNotEquals(zero, monitorViewWU);
+
+ final RectangleImmutable screenViewPU = screen.getViewport();
+ final RectangleImmutable screenViewWU = screen.getViewportInWindowUnits();
+ System.err.println("Test.1: Screen viewport: "+screenViewPU+" [pu] / "+screenViewWU+" [wu]");
+ Assert.assertNotEquals(zero, screenViewPU);
+ Assert.assertNotEquals(zero, screenViewWU);
screen.removeReference();