JOGL v2.6.0-rc-20250706
JOGL, High-Performance Graphics Binding for Java™ (public API).
TestPerf001GLJPanelInit02AWT.java
Go to the documentation of this file.
1/**
2 * Copyright 2013 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 */
28package com.jogamp.opengl.test.junit.jogl.perf;
29
30import java.awt.BorderLayout;
31import java.awt.Component;
32import java.awt.Dimension;
33import java.awt.Graphics;
34import java.lang.reflect.InvocationTargetException;
35import java.util.ArrayList;
36import java.util.List;
37import java.util.concurrent.atomic.AtomicInteger;
38
39import com.jogamp.opengl.GLAnimatorControl;
40import com.jogamp.opengl.GLAutoDrawable;
41import com.jogamp.opengl.GLCapabilities;
42import com.jogamp.opengl.GLCapabilitiesImmutable;
43import com.jogamp.opengl.GLEventListener;
44import com.jogamp.opengl.GLProfile;
45import com.jogamp.opengl.awt.GLCanvas;
46import com.jogamp.opengl.awt.GLJPanel;
47import javax.swing.JFrame;
48import javax.swing.JPanel;
49import javax.swing.JTextArea;
50import javax.swing.SwingUtilities;
51
52import org.junit.Assume;
53import org.junit.BeforeClass;
54import org.junit.FixMethodOrder;
55import org.junit.Test;
56import org.junit.runners.MethodSorters;
57
58import com.jogamp.common.os.Platform;
59import com.jogamp.newt.awt.NewtCanvasAWT;
60import com.jogamp.newt.opengl.GLWindow;
61import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
62import com.jogamp.opengl.test.junit.util.MiscUtils;
63import com.jogamp.opengl.test.junit.util.UITestCase;
64import com.jogamp.opengl.util.Animator;
65
66/**
67 * Tests multiple JFrames each with a [GLJPanels, GLCanvas or NewtCanvasAWT]
68 */
69@FixMethodOrder(MethodSorters.NAME_ASCENDING)
71 final long INIT_TIMEOUT = 10L*1000L; // 10s
72
73 @BeforeClass
74 public static void initClass() {
76 }
77
78 static enum CanvasType { NOP_T, GLCanvas_T, GLJPanel_T, NewtCanvasAWT_T };
79
80 static class GLADComp {
81 GLADComp(final GLAutoDrawable glad, final Component comp) {
82 this.glad = glad;
83 this.comp = comp;
84 }
85 final GLAutoDrawable glad;
86 final Component comp;
87 }
88
89 public void test(final GLCapabilitiesImmutable caps, final boolean useGears, final boolean skipGLOrientationVerticalFlip, final int width,
90 final int height, final int frameCount, final boolean initMT,
91 final boolean useSwingDoubleBuffer, final CanvasType canvasType, final boolean useAnim, final boolean overlap) {
92 final GLAnimatorControl animator;
93 if( useAnim ) {
94 animator = new Animator();
95 } else {
96 animator = null;
97 }
98 final int eWidth, eHeight;
99 {
100 final int cols = (int)Math.round(Math.sqrt(frameCount));
101 final int rows = frameCount / cols;
102 eWidth = width/cols-32;
103 eHeight = height/rows-32;
104 }
105 System.err.println("Frame size: "+width+"x"+height+" -> "+frameCount+" x "+eWidth+"x"+eHeight+", overlap "+overlap);
106 System.err.println("SkipGLOrientationVerticalFlip "+skipGLOrientationVerticalFlip+", useGears "+useGears+", initMT "+initMT+", useAnim "+useAnim);
107 final JFrame[] frame = new JFrame[frameCount];
108 final List<NewtCanvasAWT> newtCanvasAWTList = new ArrayList<NewtCanvasAWT>();
109
110 final long[] t = new long[10];
111 if( wait ) {
112 UITestCase.waitForKey("Pre-Init");
113 }
114 System.err.println("INIT START");
115 initCount.set(0);
116 try {
117 javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
118 public void run() {
119 t[0] = Platform.currentTimeMillis();
120 int x = 32, y = 32;
121 for(int i=0; i<frameCount; i++) {
122 frame[i] = new JFrame(i+"/"+frameCount);
123 frame[i].setLocation(x, y);
124 if(!overlap) {
125 x+=eWidth+32;
126 if(x>=width) {
127 x=32;
128 y+=eHeight+32;
129 }
130 }
131 final JPanel panel = new JPanel();
132 panel.setLayout(new BorderLayout());
133 panel.setDoubleBuffered(useSwingDoubleBuffer);
134 // panel.setBounds(0, 0, width, height);
135 final Dimension eSize = new Dimension(eWidth, eHeight);
136 final GLADComp gladComp;
137 switch(canvasType) {
138 case GLCanvas_T:
139 gladComp = createGLCanvas(caps, useGears, animator, eSize);
140 break;
141 case GLJPanel_T:
142 gladComp = createGLJPanel(initMT, useSwingDoubleBuffer, caps, useGears, skipGLOrientationVerticalFlip, animator, eSize);
143 break;
144 case NewtCanvasAWT_T:
145 gladComp = createNewtCanvasAWT(caps, useGears, animator, eSize);
146 newtCanvasAWTList.add((NewtCanvasAWT)gladComp.comp);
147 break;
148 case NOP_T:
149 gladComp = null;
150 break;
151 default: throw new InternalError("XXX");
152 }
153
154 if( null != gladComp ) {
155 gladComp.glad.addGLEventListener(new GLEventListener() {
156 @Override
157 public void init(final GLAutoDrawable drawable) {
158 initCount.incrementAndGet();
159 }
160 @Override
161 public void dispose(final GLAutoDrawable drawable) {}
162 @Override
163 public void display(final GLAutoDrawable drawable) {}
164 @Override
165 public void reshape(final GLAutoDrawable drawable, final int x, final int y, final int width, final int height) {}
166 });
167 panel.add(gladComp.comp);
168 } else {
169 @SuppressWarnings("serial")
170 final JTextArea c = new JTextArea("area "+i) {
171 boolean initialized = false, added = false;
172 int reshapeWidth=0, reshapeHeight=0;
173 @Override
174 public void addNotify() {
175 added = true;
176 super.addNotify();
177 }
178 @SuppressWarnings("deprecation")
179 @Override
180 public void reshape(final int x, final int y, final int width, final int height) {
181 super.reshape(x, y, width, height);
182 reshapeWidth = width; reshapeHeight = height;
183 }
184 @Override
185 protected void paintComponent(final Graphics g) {
186 super.paintComponent(g);
187 if( !initialized && added && reshapeWidth > 0 && reshapeHeight > 0 && isDisplayable() ) {
188 initialized = true;
189 initCount.incrementAndGet();
190 }
191 }
192 };
193 c.setEditable(false);
194 c.setSize(eSize);
195 c.setPreferredSize(eSize);
196 panel.add(c);
197 }
198 frame[i].getContentPane().add(panel);
199
200 // frame.validate();
201 frame[i].pack();
202 }
203 t[1] = Platform.currentTimeMillis();
204 for(int i=0; i<frameCount; i++) {
205 frame[i].setVisible(true);
206 }
207 t[2] = Platform.currentTimeMillis();
208 } } );
209 } catch( final Throwable throwable ) {
210 throwable.printStackTrace();
211 Assume.assumeNoException( throwable );
212 }
213 final long t0 = System.currentTimeMillis();
214 long t1 = t0;
215 while( frameCount > initCount.get() && INIT_TIMEOUT > t1 - t0 ) {
216 try {
217 Thread.sleep(100);
218 System.err.println("Sleep initialized: "+initCount+"/"+frameCount);
219 } catch (final InterruptedException e1) {
220 e1.printStackTrace();
221 }
222 t1 = System.currentTimeMillis();
223 }
224 t[3] = Platform.currentTimeMillis();
225 final double panelCountF = initCount.get();
226 System.err.printf("P: %d %s%s:%n\tctor\t%6d/t %6.2f/1%n\tvisible\t%6d/t %6.2f/1%n\tsum-i\t%6d/t %6.2f/1%n",
227 initCount.get(),
228 canvasType, initMT?" (mt)":" (01)",
229 t[1]-t[0], (t[1]-t[0])/panelCountF,
230 t[3]-t[1], (t[3]-t[1])/panelCountF,
231 t[3]-t[0], (t[3]-t[0])/panelCountF);
232
233 System.err.println("INIT END: "+initCount+"/"+frameCount);
234 if( wait ) {
235 UITestCase.waitForKey("Post-Init");
236 }
237 if( null != animator ) {
238 animator.start();
239 }
240 try {
241 Thread.sleep(duration);
242 } catch (final InterruptedException e1) {
243 e1.printStackTrace();
244 }
245 if( null != animator ) {
246 animator.stop();
247 }
248 t[4] = Platform.currentTimeMillis();
249 try {
250 SwingUtilities.invokeAndWait(new Runnable() {
251 public void run() {
252 while( !newtCanvasAWTList.isEmpty() ) {
253 newtCanvasAWTList.remove(0).destroy(); // removeNotify does not destroy GLWindow
254 }
255 for(int i=0; i<frameCount; i++) {
256 frame[i].dispose();
257 }
258 } } );
259 } catch (final Exception e1) {
260 e1.printStackTrace();
261 }
262
263 final long ti_net = (t[4]-t[0])-duration;
264 System.err.printf("T: duration %d %d%n\ttotal-d\t%6d/t %6.2f/1%n\ttotal-i\t%6d/t %6.2f/1%n",
265 duration, t[4]-t[3],
266 t[4]-t[0], (t[4]-t[0])/panelCountF,
267 ti_net, ti_net/panelCountF);
268 System.err.println("Total: "+(t[4]-t[0]));
269 }
270
271 private GLADComp createNewtCanvasAWT(final GLCapabilitiesImmutable caps, final boolean useGears, final GLAnimatorControl anim, final Dimension size) {
272 final GLWindow window = GLWindow.create(caps);
273 final NewtCanvasAWT canvas = new NewtCanvasAWT(window);
274 canvas.setSize(size);
275 canvas.setPreferredSize(size);
276 if( useGears ) {
277 final GearsES2 g = new GearsES2(0);
278 g.setVerbose(false);
279 window.addGLEventListener(g);
280 }
281 if( null != anim ) {
282 anim.add(window);
283 }
284 return new GLADComp(window, canvas);
285 }
286 private GLADComp createGLCanvas(final GLCapabilitiesImmutable caps, final boolean useGears, final GLAnimatorControl anim, final Dimension size) {
287 final GLCanvas canvas = new GLCanvas(caps);
288 canvas.setSize(size);
289 canvas.setPreferredSize(size);
290 if( useGears ) {
291 final GearsES2 g = new GearsES2(0);
292 g.setVerbose(false);
293 canvas.addGLEventListener(g);
294 }
295 if( null != anim ) {
296 anim.add(canvas);
297 }
298 return new GLADComp(canvas, canvas);
299 }
300 private GLADComp createGLJPanel(final boolean initMT, final boolean useSwingDoubleBuffer, final GLCapabilitiesImmutable caps, final boolean useGears, final boolean skipGLOrientationVerticalFlip, final GLAnimatorControl anim, final Dimension size) {
301 final GLJPanel canvas = new GLJPanel(caps);
302 canvas.setSize(size);
303 canvas.setPreferredSize(size);
304 canvas.setDoubleBuffered(useSwingDoubleBuffer);
305 if( skipGLOrientationVerticalFlip ) { // don't fiddle w/ default ..
306 canvas.setSkipGLOrientationVerticalFlip(skipGLOrientationVerticalFlip);
307 }
308 if( useGears ) {
309 final GearsES2 g = new GearsES2(0);
310 g.setVerbose(false);
311 g.setFlipVerticalInGLOrientation(skipGLOrientationVerticalFlip);
312 canvas.addGLEventListener(g);
313 }
314 if( null != anim ) {
315 anim.add(canvas);
316 }
317 if( initMT ) {
318 canvas.initializeBackend(true /* offthread */);
319 }
320 return new GLADComp(canvas, canvas);
321 }
322
323 static GLCapabilitiesImmutable caps = null;
324
325 //
326 // NOP
327 //
328
329 @Test
330 public void test00NopNoGLDefGrid() throws InterruptedException, InvocationTargetException {
331 test(new GLCapabilities(null), false /*useGears*/, false /*skipGLOrientationVerticalFlip*/, width , height, frameCount, false /* initMT */,
332 false /*useSwingDoubleBuffer*/, CanvasType.NOP_T, false /*useAnim*/, false /* overlap */);
333 }
334
335 @Test
336 public void test01NopGLCanvasDefGrid() throws InterruptedException, InvocationTargetException {
337 test(new GLCapabilities(null), false /*useGears*/, false /*skipGLOrientationVerticalFlip*/, width , height, frameCount, false /* initMT */,
338 false /*useSwingDoubleBuffer*/, CanvasType.GLCanvas_T, false /*useAnim*/, false /* overlap */);
339 }
340
341 @Test
342 public void test02NopGLJPanelDefGridSingleAutoFlip() throws InterruptedException, InvocationTargetException {
343 test(new GLCapabilities(null), false /*useGears*/, false /*skipGLOrientationVerticalFlip*/, width , height, frameCount, false /* initMT */,
344 false /*useSwingDoubleBuffer*/, CanvasType.GLJPanel_T, false /*useAnim*/, false /* overlap */);
345 }
346
347 @Test
348 public void test03NopGLJPanelDefGridSingleManualFlip() throws InterruptedException, InvocationTargetException {
349 test(new GLCapabilities(null), false /*useGears*/, true /*skipGLOrientationVerticalFlip*/, width , height, frameCount, false /* initMT */,
350 false /*useSwingDoubleBuffer*/, CanvasType.GLJPanel_T, false /*useAnim*/, false /* overlap */);
351 }
352
353 @Test
354 public void test04NopGLJPanelDefGridMTManualFlip() throws InterruptedException, InvocationTargetException {
355 test(new GLCapabilities(null), false /*useGears*/, true /*skipGLOrientationVerticalFlip*/, width , height, frameCount, true /* initMT */,
356 false /*useSwingDoubleBuffer*/, CanvasType.GLJPanel_T, false /*useAnim*/, false /* overlap */);
357 }
358
359 @Test
360 public void test05NopNewtCanvasAWTDefGrid() throws InterruptedException, InvocationTargetException {
361 test(new GLCapabilities(null), false /*useGears*/, false /*skipGLOrientationVerticalFlip*/, width , height, frameCount, false /* initMT */,
362 false /*useSwingDoubleBuffer*/, CanvasType.NewtCanvasAWT_T, false /*useAnim*/, false /* overlap */);
363 }
364
365 //
366 // Gears
367 //
368
369 @Test
370 public void test11GearsGLCanvasDefGrid() throws InterruptedException, InvocationTargetException {
371 test(new GLCapabilities(null), true /*useGears*/, false /*skipGLOrientationVerticalFlip*/, width , height, frameCount, false /* initMT */,
372 false /*useSwingDoubleBuffer*/, CanvasType.GLCanvas_T, true /*useAnim*/, false /* overlap */);
373 }
374
375 @Test
376 public void test12GearsGLJPanelDefGridSingleAutoFlip() throws InterruptedException, InvocationTargetException {
377 test(new GLCapabilities(null), true /*useGears*/, false /*skipGLOrientationVerticalFlip*/, width , height, frameCount, false /* initMT */,
378 false /*useSwingDoubleBuffer*/, CanvasType.GLJPanel_T, true /*useAnim*/, false /* overlap */);
379 }
380
381 @Test
382 public void test13GearsGLJPanelDefGridSingleManualFlip() throws InterruptedException, InvocationTargetException {
383 test(new GLCapabilities(null), true /*useGears*/, true /*skipGLOrientationVerticalFlip*/, width , height, frameCount, false /* initMT */,
384 false /*useSwingDoubleBuffer*/, CanvasType.GLJPanel_T, true /*useAnim*/, false /* overlap */);
385 }
386
387 @Test
388 public void test14GearsGLJPanelDefGridMTManualFlip() throws InterruptedException, InvocationTargetException {
389 test(new GLCapabilities(null), true /*useGears*/, true /*skipGLOrientationVerticalFlip*/, width , height, frameCount, true /* initMT */,
390 false /*useSwingDoubleBuffer*/, CanvasType.GLJPanel_T, true /*useAnim*/, false /* overlap */);
391 }
392
393 @Test
394 public void test15GearsNewtCanvasAWTDefGrid() throws InterruptedException, InvocationTargetException {
395 test(new GLCapabilities(null), true /*useGears*/, false /*skipGLOrientationVerticalFlip*/, width , height, frameCount, false /* initMT */,
396 false /*useSwingDoubleBuffer*/, CanvasType.NewtCanvasAWT_T, true /*useAnim*/, false /* overlap */);
397 }
398
399 //
400 // Overlap + NOP
401 //
402
403
404 @Test
405 public void test20NopNoGLDefOverlap() throws InterruptedException, InvocationTargetException {
406 test(null, false /*useGears*/, false /*skipGLOrientationVerticalFlip*/, width , height, frameCount, false /* initMT */,
407 false /*useSwingDoubleBuffer*/, CanvasType.NOP_T, false /*useAnim*/, true /* overlap */);
408 }
409
410 @Test
411 public void test21NopGLCanvasDefOverlap() throws InterruptedException, InvocationTargetException {
412 test(new GLCapabilities(null), false /*useGears*/, false /*skipGLOrientationVerticalFlip*/, width , height, frameCount, false /* initMT */,
413 false /*useSwingDoubleBuffer*/, CanvasType.GLCanvas_T, false /*useAnim*/, true /* overlap */);
414 }
415
416 @Test
417 public void test22NopGLJPanelDefOverlapSingle() throws InterruptedException, InvocationTargetException {
418 test(new GLCapabilities(null), false /*useGears*/, false /*skipGLOrientationVerticalFlip*/, width , height, frameCount, false /* initMT */,
419 false /*useSwingDoubleBuffer*/, CanvasType.GLJPanel_T, false /*useAnim*/, true /* overlap */);
420 }
421
422 @Test
423 public void test23NopGLJPanelDefOverlapMT() throws InterruptedException, InvocationTargetException {
424 test(new GLCapabilities(null), false /*useGears*/, false /*skipGLOrientationVerticalFlip*/, width , height, frameCount, true /* initMT */,
425 false /*useSwingDoubleBuffer*/, CanvasType.GLJPanel_T, false /*useAnim*/, true /* overlap */);
426 }
427
428 @Test
429 public void test25NopNewtCanvasAWTDefOverlap() throws InterruptedException, InvocationTargetException {
430 test(new GLCapabilities(null), false /*useGears*/, false /*skipGLOrientationVerticalFlip*/, width , height, frameCount, false /* initMT */,
431 false /*useSwingDoubleBuffer*/, CanvasType.NewtCanvasAWT_T, false /*useAnim*/, true /* overlap */);
432 }
433
434 // @Test
435 public void testXXNopGLJPanelDefOverlapSingle() throws InterruptedException, InvocationTargetException {
436 test(new GLCapabilities(null), false /*useGears*/, false /*skipGLOrientationVerticalFlip*/, width , height, frameCount, false /* initMT */,
437 false /*useSwingDoubleBuffer*/, CanvasType.GLJPanel_T, false /*useAnim*/, true /* overlap */);
438 }
439
440 // @Test
441 public void testXXNopGLJPanelBitmapGridSingle() throws InterruptedException, InvocationTargetException {
442 final GLCapabilities caps = new GLCapabilities(null);
443 caps.setBitmap(true);
444 test(caps, false /*useGears*/, false /*skipGLOrientationVerticalFlip*/, width , height, frameCount, false /* initMT */,
445 false /*useSwingDoubleBuffer*/, CanvasType.GLJPanel_T, false /*useAnim*/, false);
446 }
447
448 static long duration = 0; // ms
449 static boolean wait = false;
450 static int width = 800, height = 600, frameCount = 25;
451
452 AtomicInteger initCount = new AtomicInteger(0);
453
454 public static void main(final String[] args) {
455 boolean manual=false;
456 boolean waitMain = false;
457 CanvasType canvasType = CanvasType.GLJPanel_T;
458 boolean initMT = false, useSwingDoubleBuffer=false;
459 boolean useGears = false, skipGLOrientationVerticalFlip=false, useAnim = false;
460 boolean overlap = false;
461
462 for(int i=0; i<args.length; i++) {
463 if(args[i].equals("-time")) {
464 i++;
465 duration = MiscUtils.atol(args[i], duration);
466 } else if(args[i].equals("-width")) {
467 width = MiscUtils.atoi(args[++i], width);
468 } else if(args[i].equals("-height")) {
469 height = MiscUtils.atoi(args[++i], height);
470 } else if(args[i].equals("-count")) {
471 frameCount = MiscUtils.atoi(args[++i], frameCount);
472 } else if(args[i].equals("-initMT")) {
473 initMT = true;
474 manual = true;
475 } else if(args[i].equals("-type")) {
476 i++;
477 canvasType = CanvasType.valueOf(args[i]);
478 manual = true;
479 } else if(args[i].equals("-swingDoubleBuffer")) {
480 useSwingDoubleBuffer = true;
481 } else if(args[i].equals("-gears")) {
482 useGears = true;
483 } else if(args[i].equals("-anim")) {
484 useAnim = true;
485 } else if(args[i].equals("-userVertFlip")) {
486 skipGLOrientationVerticalFlip = true;
487 } else if(args[i].equals("-overlap")) {
488 overlap = true;
489 } else if(args[i].equals("-wait")) {
490 wait = true;
491 manual = true;
492 } else if(args[i].equals("-waitMain")) {
493 waitMain = true;
494 manual = true;
495 } else if(args[i].equals("-manual")) {
496 manual = true;
497 }
498 }
499 if( waitMain ) {
500 UITestCase.waitForKey("Main-Start");
501 }
502 if( manual ) {
505 demo.test(null, useGears, skipGLOrientationVerticalFlip, width, height, frameCount,
506 initMT, useSwingDoubleBuffer, canvasType, useAnim, overlap);
507 } else {
508 org.junit.runner.JUnitCore.main(TestPerf001GLJPanelInit02AWT.class.getName());
509 }
510 }
511
512}
void setBitmap(final boolean enable)
Requesting offscreen bitmap mode.
AWT Canvas containing a NEWT Window using native parenting.
An implementation of GLAutoDrawable and Window interface, using a delegated Window instance,...
Definition: GLWindow.java:121
static GLWindow create(final GLCapabilitiesImmutable caps)
Creates a new GLWindow attaching a new Window referencing a new default Screen and default Display wi...
Definition: GLWindow.java:169
Specifies a set of OpenGL capabilities.
Specifies the the OpenGL profile.
Definition: GLProfile.java:77
static void initSingleton()
Static initialization of JOGL.
Definition: GLProfile.java:204
Tests multiple JFrames each with a [GLJPanels, GLCanvas or NewtCanvasAWT].
void test(final GLCapabilitiesImmutable caps, final boolean useGears, final boolean skipGLOrientationVerticalFlip, final int width, final int height, final int frameCount, final boolean initMT, final boolean useSwingDoubleBuffer, final CanvasType canvasType, final boolean useAnim, final boolean overlap)
static int atoi(final String str, final int def)
Definition: MiscUtils.java:57
static long atol(final String str, final long def)
Definition: MiscUtils.java:66
An animator control interface, which implementation may drive a com.jogamp.opengl....
boolean start()
Starts this animator, if not running.
boolean stop()
Stops this animator.
void add(GLAutoDrawable drawable)
Adds a drawable to this animator's list of rendering drawables.
A higher-level abstraction than GLDrawable which supplies an event based mechanism (GLEventListener) ...
void addGLEventListener(GLEventListener listener)
Adds the given listener to the end of this drawable queue.
Specifies an immutable set of OpenGL capabilities.
Declares events which client code can use to manage OpenGL rendering into a GLAutoDrawable.