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 03:34:37 +0200
commitda52dd1299ec9b4951893733e86d708391494af0 (patch)
tree0ec121234039a5b3a55e2c611c3be3152c67f999 /src/test
parent279c5470bd99d6f9f3fdfd6aa91a2f9925c09f3b (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();