diff options
author | Sven Gothel <[email protected]> | 2013-05-09 04:49:29 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-05-09 04:49:29 +0200 |
commit | 890dabf77593732bd9833350b441a37c60f74d45 (patch) | |
tree | c8fe7ead97489bca2a4d7fe7e735baeaf25ab4f9 /src/test | |
parent | 5e0a5049d873b5896553ee530562c28ffd3fbe0c (diff) |
Fix Bug 731: GLJPanel: Access global GLPixelBuffer via SingletonGLPixelBufferProvider, if provided - releasing prev. smaller GLPixelBuffer after resize.
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/TestGearsES2GLJPanelsAWT.java | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/TestGearsES2GLJPanelsAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/TestGearsES2GLJPanelsAWT.java index 0b0030d99..54dfe6726 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/TestGearsES2GLJPanelsAWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/TestGearsES2GLJPanelsAWT.java @@ -59,7 +59,6 @@ import com.jogamp.opengl.test.junit.util.MiscUtils; import com.jogamp.opengl.test.junit.util.QuitAdapter; import com.jogamp.opengl.test.junit.util.UITestCase; import com.jogamp.opengl.util.FPSAnimator; -import com.jogamp.opengl.util.awt.AWTGLPixelBuffer.AWTGLPixelBufferProvider; import com.jogamp.opengl.util.awt.AWTGLPixelBuffer.SingleAWTGLPixelBufferProvider; public class TestGearsES2GLJPanelsAWT extends UITestCase { @@ -75,7 +74,7 @@ public class TestGearsES2GLJPanelsAWT extends UITestCase { static int swapInterval = 0; static boolean useAnimator = true; static boolean manualTest = false; - static boolean useSingleBuffer = true; // default + static boolean initSingleBuffer = false; /** * Even though GLJPanel uses a SingleAWTGLPixelBufferProvider per default, @@ -93,9 +92,9 @@ public class TestGearsES2GLJPanelsAWT extends UITestCase { setTestSupported(false); } - if( useSingleBuffer ) { + if( initSingleBuffer ) { singleAWTGLPixelBufferProvider = new SingleAWTGLPixelBufferProvider( glp.isGL2GL3() /* allowRowStride */); - singleAWTGLPixelBufferProvider.initSingleton(600, 600, 1, true); + singleAWTGLPixelBufferProvider.initSingleton(4, 600, 600, 1, true); } else { singleAWTGLPixelBufferProvider = null; } @@ -112,7 +111,7 @@ public class TestGearsES2GLJPanelsAWT extends UITestCase { throws InterruptedException, InvocationTargetException { final GLJPanel canvas = new GLJPanel(caps); - if( useSingleBuffer ) { + if( initSingleBuffer ) { canvas.setPixelBufferProvider( singleAWTGLPixelBufferProvider ); } canvas.setOpaque(opaque); @@ -377,9 +376,9 @@ public class TestGearsES2GLJPanelsAWT extends UITestCase { } else if(args[i].equals("-alpha")) { i++; glAlpha = MiscUtils.atof(args[i], glAlpha); - } else if(args[i].equals("-singleBuffer")) { + } else if(args[i].equals("-initSingleBuffer")) { i++; - useSingleBuffer = MiscUtils.atob(args[i], useSingleBuffer); + initSingleBuffer = MiscUtils.atob(args[i], initSingleBuffer); } else if(args[i].equals("-jZOrder")) { jZOrder = true; } else if(args[i].equals("-noanim")) { @@ -405,7 +404,7 @@ public class TestGearsES2GLJPanelsAWT extends UITestCase { System.err.println("shallUsePBuffer "+shallUsePBuffer); System.err.println("shallUseBitmap "+shallUseBitmap); System.err.println("manualTest "+manualTest); - System.err.println("useSingleBuffer "+useSingleBuffer); + System.err.println("useSingleBuffer "+initSingleBuffer); org.junit.runner.JUnitCore.main(TestGearsES2GLJPanelsAWT.class.getName()); } |