Jogamp
c821111a49e7149a6056db8e08c092109ef0168e
[jogl.git] / src / test / com / jogamp / opengl / test / junit / jogl / demos / es2 / newt / TestGearsES2NEWT.java
1 /**
2  * Copyright 2011 JogAmp Community. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without modification, are
5  * permitted provided that the following conditions are met:
6  *
7  *    1. Redistributions of source code must retain the above copyright notice, this list of
8  *       conditions and the following disclaimer.
9  *
10  *    2. Redistributions in binary form must reproduce the above copyright notice, this list
11  *       of conditions and the following disclaimer in the documentation and/or other materials
12  *       provided with the distribution.
13  *
14  * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
15  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
16  * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
17  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
19  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
20  * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
21  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
22  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23  *
24  * The views and conclusions contained in the software and documentation are those of the
25  * authors and should not be interpreted as representing official policies, either expressed
26  * or implied, of JogAmp Community.
27  */
28
29 package com.jogamp.opengl.test.junit.jogl.demos.es2.newt;
30
31 import java.io.IOException;
32 import java.lang.reflect.InvocationTargetException;
33
34 import com.jogamp.junit.util.JunitTracer;
35 import com.jogamp.newt.Display;
36 import com.jogamp.newt.NewtFactory;
37 import com.jogamp.newt.Screen;
38 import com.jogamp.newt.Window;
39 import com.jogamp.newt.event.WindowEvent;
40 import com.jogamp.newt.event.KeyAdapter;
41 import com.jogamp.newt.event.KeyEvent;
42 import com.jogamp.newt.event.WindowAdapter;
43 import com.jogamp.newt.opengl.GLWindow;
44 import com.jogamp.newt.opengl.util.NEWTDemoListener;
45 import com.jogamp.newt.util.EDTUtil;
46 import com.jogamp.opengl.test.junit.util.AWTRobotUtil;
47 import com.jogamp.opengl.test.junit.util.MiscUtils;
48 import com.jogamp.opengl.test.junit.util.UITestCase;
49 import com.jogamp.opengl.util.Animator;
50 import com.jogamp.opengl.util.AnimatorBase;
51 import com.jogamp.opengl.test.junit.jogl.demos.GLClearOnInitReshape;
52 import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
53 import com.jogamp.opengl.test.junit.jogl.demos.es2.LineSquareXDemoES2;
54 import com.jogamp.nativewindow.NativeWindowFactory;
55 import com.jogamp.nativewindow.ScalableSurface;
56 import com.jogamp.nativewindow.util.Dimension;
57 import com.jogamp.nativewindow.util.Point;
58 import com.jogamp.nativewindow.util.PointImmutable;
59 import com.jogamp.nativewindow.util.DimensionImmutable;
60 import com.jogamp.opengl.GLAnimatorControl;
61 import com.jogamp.opengl.GLAutoDrawable;
62 import com.jogamp.opengl.GLCapabilities;
63 import com.jogamp.opengl.GLCapabilitiesImmutable;
64 import com.jogamp.opengl.GLEventListener;
65 import com.jogamp.opengl.GLProfile;
66
67 import jogamp.newt.DefaultEDTUtil;
68
69 import org.junit.Assert;
70 import org.junit.BeforeClass;
71 import org.junit.AfterClass;
72 import org.junit.Test;
73 import org.junit.FixMethodOrder;
74 import org.junit.runners.MethodSorters;
75
76 @FixMethodOrder(MethodSorters.NAME_ASCENDING)
77 public class TestGearsES2NEWT extends UITestCase {
78     static int screenIdx = 0;
79     static PointImmutable wpos;
80     static DimensionImmutable wsize, rwsize=null;
81     static float[] reqSurfacePixelScale = new float[] { ScalableSurface.AUTOMAX_PIXELSCALE, ScalableSurface.AUTOMAX_PIXELSCALE };
82
83     static long duration = 500; // ms
84     static boolean opaque = true;
85     static int forceAlpha = -1;
86     static boolean undecorated = false;
87     static boolean alwaysOnTop = false;
88     static boolean alwaysOnBottom = false;
89     static boolean resizable = true;
90     static boolean sticky = false;
91     static boolean max_vert= false;
92     static boolean max_horz= false;
93     static boolean fullscreen = false;
94     static int swapInterval = 1;
95     static boolean waitForKey = false;
96     static boolean mouseVisible = true;
97     static boolean mouseConfined = false;
98     static boolean setPointerIcon = false;
99     static boolean showFPS = false;
100     static int loops = 1;
101     static boolean loop_shutdown = false;
102     static boolean forceES2 = false;
103     static boolean forceES3 = false;
104     static boolean forceGL3 = false;
105     static boolean forceGL2 = false;
106     static int demoType = 1;
107     static boolean manualTest = false;
108     static boolean exclusiveContext = false;
109     static boolean useAnimator = true;
110     static boolean useMappedBuffers = false;
111     static enum SysExit { none, testExit, testError, testEDTError, displayExit, displayError, displayEDTError };
112     static SysExit sysExit = SysExit.none;
113
114     @BeforeClass
115     public static void initClass() {
116         if(null == wsize) {
117             wsize = new Dimension(640, 480);
118         }
119     }
120
121     @AfterClass
122     public static void releaseClass() {
123     }
124
125     protected void runTestGL(final GLCapabilitiesImmutable caps, final boolean undecorated) throws InterruptedException {
126         System.err.println("requested: vsync "+swapInterval+", "+caps);
127         final Display dpy = NewtFactory.createDisplay(null);
128         final Screen screen = NewtFactory.createScreen(dpy, screenIdx);
129         final GLWindow glWindow = GLWindow.create(screen, caps);
130         Assert.assertNotNull(glWindow);
131         glWindow.setSurfaceScale(reqSurfacePixelScale);
132         final float[] valReqSurfacePixelScale = glWindow.getRequestedSurfaceScale(new float[2]);
133         glWindow.setSize(wsize.getWidth(), wsize.getHeight());
134         if(null != wpos) {
135             glWindow.setPosition(wpos.getX(), wpos.getY());
136         }
137         glWindow.setUndecorated(undecorated);
138         glWindow.setAlwaysOnTop(alwaysOnTop);
139         glWindow.setAlwaysOnBottom(alwaysOnBottom);
140         glWindow.setResizable(resizable);
141         glWindow.setSticky(sticky);
142         glWindow.setMaximized(max_horz, max_vert);
143         glWindow.setFullscreen(fullscreen);
144         glWindow.setPointerVisible(mouseVisible);
145         glWindow.confinePointer(mouseConfined);
146
147         final GLEventListener demo;
148         if( 2 == demoType ) {
149             final LineSquareXDemoES2 demo2 = new LineSquareXDemoES2(false);
150             demo = demo2;
151         } else if( 1 == demoType ) {
152             final GearsES2 gearsES2 = new GearsES2(swapInterval);
153             gearsES2.setUseMappedBuffers(useMappedBuffers);
154             gearsES2.setValidateBuffers(true);
155             demo = gearsES2;
156         } else if( 0 == demoType ) {
157             demo = new GLClearOnInitReshape();
158         } else {
159             demo = null;
160         }
161         if( null != demo ) {
162             glWindow.addGLEventListener(demo);
163         }
164
165         final SnapshotGLEventListener snap = new SnapshotGLEventListener();
166         glWindow.addGLEventListener(snap);
167         if(waitForKey) {
168             glWindow.addGLEventListener(new GLEventListener() {
169                 public void init(final GLAutoDrawable drawable) { }
170                 public void dispose(final GLAutoDrawable drawable) { }
171                 public void display(final GLAutoDrawable drawable) {
172                     final GLAnimatorControl  actrl = drawable.getAnimator();
173                     if(waitForKey && actrl.getTotalFPSFrames() == 60*3) {
174                         JunitTracer.waitForKey("3s mark");
175                         actrl.resetFPSCounter();
176                         waitForKey = false;
177                     }
178                 }
179                 public void reshape(final GLAutoDrawable drawable, final int x, final int y,
180                         final int width, final int height) { }
181             });
182         }
183
184         final Animator animator = useAnimator ? new Animator() : null;
185         if( useAnimator ) {
186             animator.setModeBits(false, AnimatorBase.MODE_EXPECT_AWT_RENDERING_THREAD);
187             animator.setExclusiveContext(exclusiveContext);
188         }
189
190         glWindow.addWindowListener(new WindowAdapter() {
191             public void windowResized(final WindowEvent e) {
192                 System.err.println("window resized: "+glWindow.getBounds()+" "+glWindow.getSurfaceWidth()+"x"+glWindow.getSurfaceHeight());
193                 NEWTDemoListener.setTitle(glWindow);
194             }
195             public void windowMoved(final WindowEvent e) {
196                 System.err.println("window moved:   "+glWindow.getBounds()+" "+glWindow.getSurfaceWidth()+"x"+glWindow.getSurfaceHeight());
197                 NEWTDemoListener.setTitle(glWindow);
198             }
199         });
200
201         final GLWindow[] glWindow2 = { null };
202
203         final NEWTDemoListener newtDemoListener = new NEWTDemoListener(glWindow);
204         newtDemoListener.quitAdapterEnable(true);
205         glWindow.addKeyListener(newtDemoListener);
206         glWindow.addMouseListener(newtDemoListener);
207         glWindow.addWindowListener(newtDemoListener);
208         glWindow.addKeyListener(new KeyAdapter() {
209             @Override
210             public void keyPressed(final KeyEvent e) {
211                 if( e.isAutoRepeat() ) {
212                     return;
213                 }
214                 if(e.getKeyChar()=='n') {
215                     if( null != glWindow2[0] && glWindow2[0].isNativeValid() ) {
216                         glWindow2[0].destroy();
217                         glWindow2[0] = null;
218                     } else {
219                         glWindow2[0] = GLWindow.create(screen, caps);
220                         glWindow2[0].setTitle("GLWindow2");
221                         glWindow2[0].setPosition(glWindow.getX()+glWindow.getWidth()+64, glWindow.getY());
222                         glWindow2[0].setSize(glWindow.getWidth(), glWindow.getHeight());
223                         glWindow2[0].addGLEventListener(new LineSquareXDemoES2(false));
224                         final Animator animator2 = useAnimator ? new Animator(glWindow2[0]) : null;
225                         if( null != animator2 ) {
226                             animator2.start();
227                         }
228                         glWindow2[0].setVisible(true);
229                     }
230                 }
231             } } );
232
233         if( useAnimator ) {
234             animator.add(glWindow);
235             animator.start();
236             Assert.assertTrue(animator.isStarted());
237             Assert.assertTrue(animator.isAnimating());
238             Assert.assertEquals(exclusiveContext ? animator.getThread() : null, glWindow.getExclusiveContextThread());
239         }
240
241         if( SysExit.displayError == sysExit || SysExit.displayExit == sysExit || SysExit.displayEDTError == sysExit ) {
242             glWindow.addGLEventListener(new GLEventListener() {
243                 @Override
244                 public void init(final GLAutoDrawable drawable) {}
245                 @Override
246                 public void dispose(final GLAutoDrawable drawable) { }
247                 @Override
248                 public void display(final GLAutoDrawable drawable) {
249                     final GLAnimatorControl anim = drawable.getAnimator();
250                     if( null != anim && anim.isAnimating() ) {
251                         final long ms = anim.getTotalFPSDuration();
252                         if( ms >= duration/2 || ms >= 3000 ) { // max 3s wait until provoking error
253                             if( SysExit.displayError == sysExit ) {
254                                 throw new Error("test error send from GLEventListener.display - "+Thread.currentThread());
255                             } else if ( SysExit.displayExit == sysExit ) {
256                                 System.err.println("exit(0) send from GLEventListener");
257                                 System.exit(0);
258                             } else if ( SysExit.displayEDTError == sysExit ) {
259                                 final Object upstream = drawable.getUpstreamWidget();
260                                 System.err.println("EDT invokeAndWaitError: upstream type "+upstream.getClass().getName());
261                                 if( upstream instanceof Window ) {
262                                     final EDTUtil edt = ((Window)upstream).getScreen().getDisplay().getEDTUtil();
263                                     System.err.println("EDT invokeAndWaitError: edt type "+edt.getClass().getName());
264                                     if( edt instanceof DefaultEDTUtil ) {
265                                         newtDemoListener.doQuit();
266                                         ((DefaultEDTUtil)edt).invokeAndWaitError(new Runnable() {
267                                             public void run() {
268                                                 throw new RuntimeException("XXX Should never ever be seen! - "+Thread.currentThread());
269                                             }
270                                         });
271                                     }
272                                 }
273                             }
274                         }
275                     } else {
276                         System.exit(0);
277                     }
278                 }
279                 @Override
280                 public void reshape(final GLAutoDrawable drawable, final int x, final int y, final int width, final int height) { }
281             });
282         }
283
284         glWindow.setVisible(true);
285         if( useAnimator ) {
286             animator.setUpdateFPSFrames(60, showFPS ? System.err : null);
287         }
288
289         System.err.println("Window Current State   : "+glWindow.getStateMaskString());
290         System.err.println("Window Supported States: "+glWindow.getSupportedStateMaskString());
291         System.err.println("NW chosen: "+glWindow.getDelegatedWindow().getChosenCapabilities());
292         System.err.println("GL chosen: "+glWindow.getChosenCapabilities());
293         System.err.println("window pos/siz: "+glWindow.getX()+"/"+glWindow.getY()+" "+glWindow.getSurfaceWidth()+"x"+glWindow.getSurfaceHeight()+", "+glWindow.getInsets());
294
295         final float[] hasSurfacePixelScale1 = glWindow.getCurrentSurfaceScale(new float[2]);
296         System.err.println("HiDPI PixelScale: "+reqSurfacePixelScale[0]+"x"+reqSurfacePixelScale[1]+" (req) -> "+
297                            valReqSurfacePixelScale[0]+"x"+valReqSurfacePixelScale[1]+" (val) -> "+
298                            hasSurfacePixelScale1[0]+"x"+hasSurfacePixelScale1[1]+" (has)");
299         NEWTDemoListener.setTitle(glWindow);
300
301         snap.setMakeSnapshot();
302
303         if( null != rwsize ) {
304             Thread.sleep(500); // 500ms delay
305             glWindow.setSize(rwsize.getWidth(), rwsize.getHeight());
306             System.err.println("window resize pos/siz: "+glWindow.getX()+"/"+glWindow.getY()+" "+glWindow.getSurfaceWidth()+"x"+glWindow.getSurfaceHeight()+", "+glWindow.getInsets());
307         }
308
309         snap.setMakeSnapshot();
310
311         final long t0 = System.currentTimeMillis();
312         long t1 = t0;
313         while(!newtDemoListener.shouldQuit() && t1-t0<duration) {
314             Thread.sleep(100);
315             t1 = System.currentTimeMillis();
316             if( SysExit.testError == sysExit || SysExit.testExit == sysExit || SysExit.testEDTError == sysExit) {
317                 final long ms = t1-t0;
318                 if( ms >= duration/2 || ms >= 3000 ) { // max 3s wait until provoking error
319                     if( SysExit.testError == sysExit ) {
320                         throw new Error("test error send from test thread");
321                     } else if ( SysExit.testExit == sysExit ) {
322                         System.err.println("exit(0) send from test thread");
323                         System.exit(0);
324                     } else if ( SysExit.testEDTError == sysExit ) {
325                         final EDTUtil edt = glWindow.getScreen().getDisplay().getEDTUtil();
326                         System.err.println("EDT invokeAndWaitError: edt type "+edt.getClass().getName());
327                         if( edt instanceof DefaultEDTUtil ) {
328                             newtDemoListener.doQuit();
329                             ((DefaultEDTUtil)edt).invokeAndWaitError(new Runnable() {
330                                 public void run() {
331                                     throw new RuntimeException("XXX Should never ever be seen!");
332                                 }
333                             });
334                         }
335                     }
336                 }
337             }
338         }
339
340         if( useAnimator ) {
341             Assert.assertEquals(exclusiveContext ? animator.getThread() : null, glWindow.getExclusiveContextThread());
342             animator.stop();
343             Assert.assertFalse(animator.isAnimating());
344             Assert.assertFalse(animator.isStarted());
345         }
346         Assert.assertEquals(null, glWindow.getExclusiveContextThread());
347         glWindow.destroy();
348         if( null != glWindow2[0] && glWindow2[0].isNativeValid() ) {
349             glWindow2[0].destroy();
350             glWindow2[0] = null;
351         }
352         if( NativeWindowFactory.isAWTAvailable() ) {
353             Assert.assertEquals(true,  AWTRobotUtil.waitForRealized(glWindow, false));
354         }
355     }
356
357     @Test
358     public void test01_GL2ES2() throws InterruptedException {
359         for(int i=1; i<=loops; i++) {
360             System.err.println("Loop "+i+"/"+loops);
361             final GLProfile glp;
362             if(forceGL3) {
363                 glp = GLProfile.get(GLProfile.GL3);
364             } else if(forceES3) {
365                 glp = GLProfile.get(GLProfile.GLES3);
366             } else if(forceES2) {
367                 glp = GLProfile.get(GLProfile.GLES2);
368             } else if(forceGL2) {
369                 glp = GLProfile.get(GLProfile.GL2);
370             } else {
371                 glp = GLProfile.getGL2ES2();
372             }
373             final GLCapabilities caps = new GLCapabilities( glp );
374             caps.setBackgroundOpaque(opaque);
375             if(-1 < forceAlpha) {
376                 caps.setAlphaBits(forceAlpha);
377             }
378             runTestGL(caps, undecorated);
379             if(loop_shutdown) {
380                 GLProfile.shutdown();
381             }
382         }
383     }
384
385     @Test
386     public void test02_GLES2() throws InterruptedException {
387         if(manualTest) return;
388
389         if( !GLProfile.isAvailable(GLProfile.GLES2) ) {
390             System.err.println("GLES2 n/a");
391             return;
392         }
393         final GLProfile glp = GLProfile.get(GLProfile.GLES2);
394         final GLCapabilities caps = new GLCapabilities( glp );
395         runTestGL(caps, undecorated);
396     }
397
398     @Test
399     public void test03_GL3() throws InterruptedException {
400         if(manualTest) return;
401
402         if( !GLProfile.isAvailable(GLProfile.GL3) ) {
403             System.err.println("GL3 n/a");
404             return;
405         }
406         final GLProfile glp = GLProfile.get(GLProfile.GL3);
407         final GLCapabilities caps = new GLCapabilities( glp );
408         runTestGL(caps, undecorated);
409     }
410
411     @Test
412     public void test99_PixelScale1_DefaultNorm() throws InterruptedException, InvocationTargetException {
413         if( manualTest ) return;
414
415         reqSurfacePixelScale[0] = ScalableSurface.IDENTITY_PIXELSCALE;
416         reqSurfacePixelScale[1] = ScalableSurface.IDENTITY_PIXELSCALE;
417
418         final GLCapabilities caps = new GLCapabilities(GLProfile.getGL2ES2());
419         runTestGL(caps, undecorated);
420     }
421
422     public static void main(final String args[]) throws IOException {
423         int x=0, y=0, w=640, h=480, rw=-1, rh=-1;
424         boolean usePos = false;
425
426         for(int i=0; i<args.length; i++) {
427             if(args[i].equals("-time")) {
428                 i++;
429                 duration = MiscUtils.atol(args[i], duration);
430             } else if(args[i].equals("-translucent")) {
431                 opaque = false;
432             } else if(args[i].equals("-forceAlpha")) {
433                 i++;
434                 forceAlpha = MiscUtils.atoi(args[i], 0);
435             } else if(args[i].equals("-undecorated")) {
436                 undecorated = true;
437             } else if(args[i].equals("-atop")) {
438                 alwaysOnTop = true;
439             } else if(args[i].equals("-abottom")) {
440                 alwaysOnBottom = true;
441             } else if(args[i].equals("-noresize")) {
442                 resizable = false;
443             } else if(args[i].equals("-sticky")) {
444                 sticky = true;
445             } else if(args[i].equals("-maxv")) {
446                 max_vert = true;
447             } else if(args[i].equals("-maxh")) {
448                 max_horz = true;
449             } else if(args[i].equals("-fullscreen")) {
450                 fullscreen = true;
451             } else if(args[i].equals("-vsync")) {
452                 i++;
453                 swapInterval = MiscUtils.atoi(args[i], swapInterval);
454             } else if(args[i].equals("-exclctx")) {
455                 exclusiveContext = true;
456             } else if(args[i].equals("-noanim")) {
457                 useAnimator  = false;
458             } else if(args[i].equals("-es2")) {
459                 forceES2 = true;
460             } else if(args[i].equals("-es3")) {
461                 forceES3 = true;
462             } else if(args[i].equals("-gl3")) {
463                 forceGL3 = true;
464             } else if(args[i].equals("-gl2")) {
465                 forceGL2 = true;
466             } else if(args[i].equals("-mappedBuffers")) {
467                 useMappedBuffers = true;
468             } else if(args[i].equals("-wait")) {
469                 waitForKey = true;
470             } else if(args[i].equals("-mouseInvisible")) {
471                 mouseVisible = false;
472             } else if(args[i].equals("-mouseConfine")) {
473                 mouseConfined = true;
474             } else if(args[i].equals("-pointerIcon")) {
475                 setPointerIcon = true;
476             } else if(args[i].equals("-showFPS")) {
477                 showFPS = true;
478             } else if(args[i].equals("-width")) {
479                 i++;
480                 w = MiscUtils.atoi(args[i], w);
481             } else if(args[i].equals("-height")) {
482                 i++;
483                 h = MiscUtils.atoi(args[i], h);
484             } else if(args[i].equals("-x")) {
485                 i++;
486                 x = MiscUtils.atoi(args[i], x);
487                 usePos = true;
488             } else if(args[i].equals("-y")) {
489                 i++;
490                 y = MiscUtils.atoi(args[i], y);
491                 usePos = true;
492             } else if(args[i].equals("-pixelScale")) {
493                 i++;
494                 final float pS = MiscUtils.atof(args[i], reqSurfacePixelScale[0]);
495                 reqSurfacePixelScale[0] = pS;
496                 reqSurfacePixelScale[1] = pS;
497             } else if(args[i].equals("-rwidth")) {
498                 i++;
499                 rw = MiscUtils.atoi(args[i], rw);
500             } else if(args[i].equals("-rheight")) {
501                 i++;
502                 rh = MiscUtils.atoi(args[i], rh);
503             } else if(args[i].equals("-screen")) {
504                 i++;
505                 screenIdx = MiscUtils.atoi(args[i], 0);
506             } else if(args[i].equals("-loops")) {
507                 i++;
508                 loops = MiscUtils.atoi(args[i], 1);
509             } else if(args[i].equals("-loop-shutdown")) {
510                 loop_shutdown = true;
511             } else if(args[i].equals("-sysExit")) {
512                 i++;
513                 sysExit = SysExit.valueOf(args[i]);
514             } else if(args[i].equals("-manual")) {
515                 manualTest = true;
516             } else if(args[i].equals("-demo")) {
517                 i++;
518                 demoType = MiscUtils.atoi(args[i], 0);
519             }
520         }
521         wsize = new Dimension(w, h);
522         if( 0 < rw && 0 < rh ) {
523             rwsize = new Dimension(rw, rh);
524         }
525
526         if(usePos) {
527             wpos = new Point(x, y);
528         }
529         System.err.println("position "+wpos);
530         System.err.println("size "+wsize);
531         System.err.println("resize "+rwsize);
532         System.err.println("screen "+screenIdx);
533         System.err.println("translucent "+(!opaque));
534         System.err.println("forceAlpha "+forceAlpha);
535         System.err.println("undecorated "+undecorated);
536         System.err.println("atop "+alwaysOnTop);
537         System.err.println("abottom "+alwaysOnBottom);
538         System.err.println("resizable "+resizable);
539         System.err.println("sticky "+sticky);
540         System.err.println("max_vert "+max_vert);
541         System.err.println("max_horz "+max_horz);
542         System.err.println("fullscreen "+fullscreen);
543         System.err.println("mouseVisible "+mouseVisible);
544         System.err.println("mouseConfined "+mouseConfined);
545         System.err.println("pointerIcon "+setPointerIcon);
546         System.err.println("loops "+loops);
547         System.err.println("loop shutdown "+loop_shutdown);
548         System.err.println("forceES2 "+forceES2);
549         System.err.println("forceES3 "+forceES3);
550         System.err.println("forceGL3 "+forceGL3);
551         System.err.println("forceGL2 "+forceGL2);
552         System.err.println("swapInterval "+swapInterval);
553         System.err.println("exclusiveContext "+exclusiveContext);
554         System.err.println("useAnimator "+useAnimator);
555         System.err.println("sysExitWithin "+sysExit);
556         System.err.println("mappedBuffers "+useMappedBuffers);
557         System.err.println("demoType "+demoType);
558
559         if(waitForKey) {
560             JunitTracer.waitForKey("Start");
561         }
562         org.junit.runner.JUnitCore.main(TestGearsES2NEWT.class.getName());
563     }
564 }
http://JogAmp.org git info: FAQ, tutorial and man pages.