From ea0f37d33acff83091fdb0e47a70cfad7186dfe8 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 11 Jun 2014 02:36:43 +0200 Subject: Graph RegionRenderer: Fix GL3 and ES3 GLSL issues Macro redefine 'texture2D -> texture' was added _after_ the custom texture lookup insertion causing GL3-core to fail. --- .../graph/demos/GPUUISceneNewtCanvasAWTDemo.java | 32 ++++++++++++++- .../test/junit/graph/demos/GPUUISceneNewtDemo.java | 46 +++++++++++++++++++++- 2 files changed, 76 insertions(+), 2 deletions(-) (limited to 'src/test/com/jogamp/opengl') diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneNewtCanvasAWTDemo.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneNewtCanvasAWTDemo.java index 011b20c35..bd0af580a 100644 --- a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneNewtCanvasAWTDemo.java +++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneNewtCanvasAWTDemo.java @@ -50,6 +50,12 @@ public class GPUUISceneNewtCanvasAWTDemo { public static void main(String[] args) throws InterruptedException, InvocationTargetException { int width = 800, height = 400; int x = 10, y = 10; + + boolean forceES2 = false; + boolean forceES3 = false; + boolean forceGL3 = false; + boolean forceGLDef = false; + if( 0 != args.length ) { for(int i=0; i 0 ) { diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneNewtDemo.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneNewtDemo.java index dbf0838eb..ee3b129b7 100644 --- a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneNewtDemo.java +++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneNewtDemo.java @@ -1,5 +1,6 @@ package com.jogamp.opengl.test.junit.graph.demos; +import javax.media.nativewindow.ScalableSurface; import javax.media.opengl.GLCapabilities; import javax.media.opengl.GLProfile; @@ -19,9 +20,17 @@ public class GPUUISceneNewtDemo { static boolean GraphMSAAMode = false; static float GraphAutoMode = GPUUISceneGLListener0A.DefaultNoAADPIThreshold; + static int[] reqSurfacePixelScale = new int[] { ScalableSurface.AUTOMAX_PIXELSCALE, ScalableSurface.AUTOMAX_PIXELSCALE }; + public static void main(String[] args) { int width = 800, height = 400; int x = 10, y = 10; + + boolean forceES2 = false; + boolean forceES3 = false; + boolean forceGL3 = false; + boolean forceGLDef = false; + if( 0 != args.length ) { for(int i=0; i 0 ) { @@ -89,6 +127,8 @@ public class GPUUISceneNewtDemo { window.setPosition(x, y); window.setSize(width, height); window.setTitle("GraphUI Newt Demo: graph["+Region.getRenderModeString(rmode)+"], msaa "+SceneMSAASamples); + window.setSurfaceScale(reqSurfacePixelScale); + final int[] valReqSurfacePixelScale = window.getRequestedSurfaceScale(new int[2]); GPUUISceneGLListener0A sceneGLListener = 0 < GraphAutoMode ? new GPUUISceneGLListener0A(GraphAutoMode, DEBUG, TRACE) : new GPUUISceneGLListener0A(rmode, DEBUG, TRACE); @@ -107,6 +147,10 @@ public class GPUUISceneNewtDemo { }); window.setVisible(true); + final int[] hasSurfacePixelScale1 = window.getCurrentSurfaceScale(new int[2]); + System.err.println("HiDPI PixelScale: "+reqSurfacePixelScale[0]+"x"+reqSurfacePixelScale[1]+" (req) -> "+ + valReqSurfacePixelScale[0]+"x"+valReqSurfacePixelScale[1]+" (val) -> "+ + hasSurfacePixelScale1[0]+"x"+hasSurfacePixelScale1[1]+" (has)"); animator.start(); } } -- cgit v1.2.3