public static void main(final String args[]) { for (int i = 0; i < args.length; i++) { if (args[i].equals("-time")) { i++; duration = MiscUtils.atol(args[i], duration); } else if (args[i].equals("-test")) { i++; testNum = MiscUtils.atoi(args[i], 0); } else if (args[i].equals("-noresize")) { rwsize = null; } else if (args[i].equals("-es2")) { forceES2 = true; } else if (args[i].equals("-gl3")) { forceGL3 = true; } else if (args[i].equals("-vsync")) { i++; swapInterval = MiscUtils.atoi(args[i], swapInterval); } } System.err.println("resize " + rwsize); System.err.println("forceES2 " + forceES2); System.err.println("forceGL3 " + forceGL3); System.err.println("swapInterval " + swapInterval); org.junit.runner.JUnitCore.main(TestBug816OSXCALayerPos01AWT.class.getName()); }
public static void setDemoFields(GLEventListener demo, GLWindow glWindow, boolean debug) { Assert.assertNotNull(demo); Assert.assertNotNull(glWindow); Window window = glWindow.getWindow(); if (debug) { MiscUtils.setFieldIfExists(demo, "glDebug", true); MiscUtils.setFieldIfExists(demo, "glTrace", true); } if (!MiscUtils.setFieldIfExists(demo, "window", window)) { MiscUtils.setFieldIfExists(demo, "glWindow", glWindow); } }
public static void main(String args[]) throws IOException { System.err.println("main - start"); boolean wait = false; for (int i = 0; i < args.length; i++) { if (args[i].equals("-time")) { durationPerTest = MiscUtils.atoi(args[++i], (int) durationPerTest); } if (args[i].equals("-wait")) { wait = true; } } if (wait) { while (-1 == System.in.read()) ; TestGLSLShaderState01NEWT tst = new TestGLSLShaderState01NEWT(); try { tst.testShaderState01PerformanceDouble(); } catch (Exception e) { e.printStackTrace(); } } else { String tstname = TestGLSLShaderState01NEWT.class.getName(); org.junit.runner.JUnitCore.main(tstname); } System.err.println("main - end"); }
public static void main(String args[]) throws IOException { for (int i = 0; i < args.length; i++) { if (args[i].equals("-time")) { i++; duration = MiscUtils.atol(args[i], duration); } } org.junit.runner.JUnitCore.main(TestTGATextureFromFileNEWT.class.getName()); }
public static void main(String args[]) throws IOException { ManualTest = args.length > 0; for (int i = 0; i < args.length; i++) { if (args[i].equals("-time")) { i++; Duration = atoi(args[i]); } else if (args[i].equals("-fontFile")) { i++; fontFileName = args[i]; } else if (args[i].equals("-fontSet")) { i++; fontSet = atoi(args[i]); } else if (args[i].equals("-fontFamily")) { i++; fontFamily = atoi(args[i]); } else if (args[i].equals("-fontStyle")) { i++; fontStylebits = atoi(args[i]); } else if (args[i].equals("-fontSize")) { i++; fontSizeFixed = atoi(args[i]); } else if (args[i].equals("-smsaa")) { i++; SceneMSAASamples = atoi(args[i]); } else if (args[i].equals("-gmsaa")) { i++; GraphMSAASamples = atoi(args[i]); } else if (args[i].equals("-gvbaa")) { i++; GraphVBAASamples = atoi(args[i]); } else if (args[i].equals("-textAnim")) { TextAnim = true; } else if (args[i].equals("-vsync")) { i++; SwapInterval = MiscUtils.atoi(args[i], SwapInterval); } else if (args[i].equals("-wait")) { WaitStartEnd = true; } } System.err.println( "Font [set " + fontSet + ", family " + fontFamily + ", style " + fontStylebits + ", size " + fontSizeFixed + "], fontFileName " + fontFileName); System.err.println("Scene MSAA Samples " + SceneMSAASamples); System.err.println("Graph MSAA Samples " + GraphMSAASamples); System.err.println("Graph VBAA Samples " + GraphVBAASamples); System.err.println("swapInterval " + SwapInterval); String tstname = TestTextRendererNEWT00.class.getName(); org.junit.runner.JUnitCore.main(tstname); }
public static void main(String args[]) throws IOException { for (int i = 0; i < args.length; i++) { if (args[i].equals("-time")) { duration = MiscUtils.atoi(args[++i], (int) duration); } } String tstname = TestBug692GL3VAONEWT.class.getName(); org.junit.runner.JUnitCore.main(tstname); }
public static void main(final String args[]) throws IOException { for (int i = 0; i < args.length; i++) { if (args[i].equals("-time")) { i++; duration = MiscUtils.atol(args[i], duration); } } org.junit.runner.JUnitCore.main(TestTessellationShader01GL4NEWT.class.getName()); }
public static void main(final String[] args) { for (int i = 0; i < args.length; i++) { if (args[i].equals("-time")) { durationPerTest = MiscUtils.atoi(args[++i], 500); } } System.out.println("durationPerTest: " + durationPerTest); final String tstname = TestMultisampleES2NEWT.class.getName(); org.junit.runner.JUnitCore.main(tstname); }
public static void main(String[] args) { for (int i = 0; i < args.length; i++) { if (args[i].equals("-time")) { i++; duration = MiscUtils.atol(args[i], duration); } else if (args[i].equals("-keyFrame")) { keyFrame = true; } else if (args[i].equals("-noSnapshot")) { doSnapshot = false; } } org.junit.runner.JUnitCore.main(TestGLReadBuffer01GLCanvasAWT.class.getName()); }
public static void main(final String args[]) { for (int i = 0; i < args.length; i++) { if (args[i].equals("-time")) { i++; duration = MiscUtils.atol(args[i], duration); } else if (args[i].equals("-noanim")) { useAnimator = false; } else if (args[i].equals("-noresize")) { doResizeTest = false; } } System.err.println("useAnimator " + useAnimator); org.junit.runner.JUnitCore.main(TestGearsNewtAWTWrapper.class.getName()); }
public static void main(final String args[]) { for (int i = 0; i < args.length; i++) { if (args[i].equals("-time")) { i++; try { duration = Integer.parseInt(args[i]); } catch (final Exception ex) { ex.printStackTrace(); } } else if (args[i].equals("-vsync")) { i++; swapInterval = MiscUtils.atoi(args[i], swapInterval); } else if (args[i].equals("-es2")) { forceES2 = true; } else if (args[i].equals("-ffpemu")) { forceFFPEmu = true; } } org.junit.runner.JUnitCore.main(TestGearsES1NEWT.class.getName()); }
public static void main(final String args[]) { int w = 640, h = 480, rw = -1, rh = -1; for (int i = 0; i < args.length; i++) { if (args[i].equals("-time")) { i++; duration = MiscUtils.atol(args[i], duration); } else if (args[i].equals("-es2")) { forceES2 = true; } else if (args[i].equals("-es3")) { forceES3 = true; } else if (args[i].equals("-gl3")) { forceGL3 = true; } else if (args[i].equals("-glFFP")) { forceGLFFP = true; } else if (args[i].equals("-width")) { i++; w = MiscUtils.atoi(args[i], w); } else if (args[i].equals("-height")) { i++; h = MiscUtils.atoi(args[i], h); } else if (args[i].equals("-x")) { i++; xpos = MiscUtils.atoi(args[i], xpos); } else if (args[i].equals("-y")) { i++; ypos = MiscUtils.atoi(args[i], ypos); } else if (args[i].equals("-rwidth")) { i++; rw = MiscUtils.atoi(args[i], rw); } else if (args[i].equals("-rheight")) { i++; rh = MiscUtils.atoi(args[i], rh); } else if (args[i].equals("-pixelScale")) { i++; final float pS = MiscUtils.atof(args[i], reqSurfacePixelScale[0]); reqSurfacePixelScale[0] = pS; reqSurfacePixelScale[1] = pS; } else if (args[i].equals("-userVFlip")) { skipGLOrientationVerticalFlip = true; } else if (args[i].equals("-vsync")) { i++; swapInterval = MiscUtils.atoi(args[i], swapInterval); } else if (args[i].equals("-msaa")) { i++; useMSAA = true; msaaNumSamples = MiscUtils.atoi(args[i], msaaNumSamples); } else if (args[i].equals("-noanim")) { useAnimator = false; } else if (args[i].equals("-pbuffer")) { shallUsePBuffer = true; } else if (args[i].equals("-bitmap")) { shallUseBitmap = true; } else if (args[i].equals("-manual")) { manualTest = true; } else if (args[i].equals("-demo")) { i++; demoType = MiscUtils.atoi(args[i], 0); } } wsize = new Dimension(w, h); if (0 < rw && 0 < rh) { rwsize = new Dimension(rw, rh); } System.err.println("size " + wsize); System.err.println("resize " + rwsize); System.err.println("userVFlip " + skipGLOrientationVerticalFlip); System.err.println("swapInterval " + swapInterval); System.err.println("forceES2 " + forceES2); System.err.println("forceGL3 " + forceGL3); System.err.println("forceGLFFP " + forceGLFFP); System.err.println("useMSAA " + useMSAA + ", msaaNumSamples " + msaaNumSamples); System.err.println("useAnimator " + useAnimator); System.err.println("shallUsePBuffer " + shallUsePBuffer); System.err.println("shallUseBitmap " + shallUseBitmap); System.err.println("manualTest " + manualTest); System.err.println("demoType " + demoType); org.junit.runner.JUnitCore.main(TestGearsES2GLJPanelAWT.class.getName()); }
public void asyncEachOneAnimator(final boolean destroyCleanOrder) throws InterruptedException, InvocationTargetException { final Frame f1 = new Frame(); final Animator a1 = new Animator(); final GearsES2 g1 = new GearsES2(0); final GLCanvas c1 = createGLCanvas(f1, 0, 0, g1); a1.add(c1); a1.start(); // f1.setVisible(true); // we do this post f2 .. to test pending creation! final Frame f2 = new Frame(); final Animator a2 = new Animator(); final GearsES2 g2 = new GearsES2(0); g2.setSharedGears(g1); final GLCanvas c2 = createGLCanvas(f2, f1.getX() + width, f1.getY() + 0, g2); c2.setSharedAutoDrawable(c1); a2.add(c2); a2.start(); javax.swing.SwingUtilities.invokeAndWait( new Runnable() { public void run() { f2.setVisible(true); } }); Thread.sleep(200); // wait a while .. javax.swing.SwingUtilities.invokeAndWait( new Runnable() { public void run() { f1.setVisible(true); // test pending creation of f2 } }); final Frame f3 = new Frame(); final Animator a3 = new Animator(); final GearsES2 g3 = new GearsES2(0); g3.setSharedGears(g1); final GLCanvas c3 = createGLCanvas(f3, f1.getX() + 0, f1.getY() + height, g3); c3.setSharedAutoDrawable(c1); a3.add(c3); a3.start(); javax.swing.SwingUtilities.invokeAndWait( new Runnable() { public void run() { f3.setVisible(true); } }); Thread.sleep( 1000 / 60 * 10); // wait ~10 frames giving a chance to create (blocking until master share is // valid) Assert.assertTrue(AWTRobotUtil.waitForRealized(c1, true)); Assert.assertTrue(AWTRobotUtil.waitForVisible(c1, true)); Assert.assertTrue(AWTRobotUtil.waitForContextCreated(c1, true)); Assert.assertTrue("Gears1 not initialized", g1.waitForInit(true)); Assert.assertTrue(AWTRobotUtil.waitForRealized(c2, true)); Assert.assertTrue(AWTRobotUtil.waitForVisible(c2, true)); Assert.assertTrue(AWTRobotUtil.waitForContextCreated(c2, true)); Assert.assertTrue("Gears2 not initialized", g2.waitForInit(true)); Assert.assertTrue(AWTRobotUtil.waitForRealized(c3, true)); Assert.assertTrue(AWTRobotUtil.waitForVisible(c3, true)); Assert.assertTrue(AWTRobotUtil.waitForContextCreated(c3, true)); Assert.assertTrue("Gears3 not initialized", g3.waitForInit(true)); final GLContext ctx1 = c1.getContext(); final GLContext ctx2 = c2.getContext(); final GLContext ctx3 = c3.getContext(); { final List<GLContext> ctx1Shares = ctx1.getCreatedShares(); final List<GLContext> ctx2Shares = ctx2.getCreatedShares(); final List<GLContext> ctx3Shares = ctx3.getCreatedShares(); MiscUtils.dumpSharedGLContext("XXX-C-3.1", ctx1); MiscUtils.dumpSharedGLContext("XXX-C-3.2", ctx2); MiscUtils.dumpSharedGLContext("XXX-C-3.3", ctx3); Assert.assertTrue("Ctx1 is not shared", ctx1.isShared()); Assert.assertTrue("Ctx2 is not shared", ctx2.isShared()); Assert.assertTrue("Ctx3 is not shared", ctx3.isShared()); Assert.assertEquals("Ctx1 has unexpected number of created shares", 2, ctx1Shares.size()); Assert.assertEquals("Ctx2 has unexpected number of created shares", 2, ctx2Shares.size()); Assert.assertEquals("Ctx3 has unexpected number of created shares", 2, ctx3Shares.size()); } Assert.assertTrue("Gears1 is shared", !g1.usesSharedGears()); Assert.assertTrue("Gears2 is not shared", g2.usesSharedGears()); Assert.assertTrue("Gears3 is not shared", g3.usesSharedGears()); try { Thread.sleep(duration); } catch (final Exception e) { e.printStackTrace(); } // Stopped animator allows native windowing system 'repaint' event // to trigger GLAD 'display' a1.stop(); Assert.assertEquals(false, a1.isAnimating()); a2.stop(); Assert.assertEquals(false, a2.isAnimating()); a3.stop(); Assert.assertEquals(false, a3.isAnimating()); if (destroyCleanOrder) { System.err.println("XXX Destroy in clean order NOW"); } else { System.err.println( "XXX Destroy in creation order NOW - Driver Impl. Ma trigger driver Bug i.e. not postponing GL ctx destruction after releasing all refs."); } javax.swing.SwingUtilities.invokeAndWait( new Runnable() { public void run() { try { if (destroyCleanOrder) { f3.dispose(); } else { f1.dispose(); } } catch (final Throwable t) { throw new RuntimeException(t); } } }); javax.swing.SwingUtilities.invokeAndWait( new Runnable() { public void run() { try { f2.dispose(); } catch (final Throwable t) { throw new RuntimeException(t); } } }); javax.swing.SwingUtilities.invokeAndWait( new Runnable() { public void run() { try { if (destroyCleanOrder) { f1.dispose(); } else { f3.dispose(); } } catch (final Throwable t) { throw new RuntimeException(t); } } }); Assert.assertTrue(AWTRobotUtil.waitForRealized(c1, false)); Assert.assertTrue(AWTRobotUtil.waitForRealized(c2, false)); Assert.assertTrue(AWTRobotUtil.waitForRealized(c3, false)); }