summaryrefslogtreecommitdiffstats
path: root/src/test/com
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-10-22 12:02:43 +0200
committerSven Gothel <[email protected]>2011-10-22 12:02:43 +0200
commit39fc0cdbcc456fe33e0ff167b8a0ce1499b8e46e (patch)
tree47386b83f4b2f6689a2acb4cf8734facb48aa699 /src/test/com
parentd6ecf1d8dd105f2d84e86e94159dc55700d2e0e6 (diff)
Test/Ruler/ScreenMode: Validate whether current ScreenMode exists
Diffstat (limited to 'src/test/com')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestRulerNEWT01.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestRulerNEWT01.java b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestRulerNEWT01.java
index cc97efb43..fe1149f86 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestRulerNEWT01.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestRulerNEWT01.java
@@ -28,6 +28,7 @@
package com.jogamp.opengl.test.junit.jogl.glsl;
import com.jogamp.common.nio.Buffers;
+import com.jogamp.newt.ScreenMode;
import com.jogamp.newt.util.MonitorMode;
import com.jogamp.opengl.util.GLArrayDataServer;
import com.jogamp.opengl.util.PMVMatrix;
@@ -105,7 +106,13 @@ public class TestRulerNEWT01 extends UITestCase {
st.uniform(gl, rulerColor);
Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
- final MonitorMode mmode = winctx.window.getScreen().getCurrentScreenMode().getMonitorMode();
+ Assert.assertNotNull(winctx);
+ Assert.assertNotNull(winctx.window);
+ Assert.assertNotNull(winctx.window.getScreen());
+ ScreenMode sm = winctx.window.getScreen().getCurrentScreenMode();
+ Assert.assertNotNull(sm);
+ System.err.println(sm);
+ final MonitorMode mmode = sm.getMonitorMode();
final DimensionImmutable sdim = mmode.getScreenSizeMM();
final DimensionImmutable spix = mmode.getSurfaceSize().getResolution();
final GLUniformData rulerPixFreq = new GLUniformData("gcu_RulerPixFreq", 2, Buffers.newDirectFloatBuffer(2));