JOGL: src/test/com/jogamp/opengl/test/junit/newt/TestDisplayLifecycle02NEWT.java Source File

JOGL v2.6.0-rc-20250822 JOGL, High-Performance Graphics Binding for Java™ (public API).

TestDisplayLifecycle02NEWT.java
Go to the documentation of this file.
1/**
2 * Copyright 2010 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
29package com.jogamp.opengl.test.junit.newt;
30
31import org.junit.Assert;
32import org.junit.BeforeClass;
33import org.junit.Test;
34import org.junit.FixMethodOrder;
35import org.junit.runners.MethodSorters;
36
37import com.jogamp.nativewindow.util.RectangleImmutable;
38import com.jogamp.opengl.*;
39
40import com.jogamp.newt.*;
41import com.jogamp.newt.event.*;
42import com.jogamp.newt.opengl.*;
43
44import java.io.IOException;
45
46import com.jogamp.opengl.test.junit.util.UITestCase;
47import com.jogamp.opengl.test.junit.util.MiscUtils;
48import com.jogamp.opengl.test.junit.util.NewtTestUtil;
49import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
50
51@FixMethodOrder(MethodSorters.NAME_ASCENDING)
52public class TestDisplayLifecycle02NEWT extends UITestCase {
53 static GLProfile glp;
54 static GLCapabilities caps;
55 static final int width = 500, height = 500, xy_pos=100;
56 static long durationPerTest = 100; // ms
57
58 @BeforeClass
59 public static void initClass() {
60 glp = GLProfile.getDefault();
61 caps = new GLCapabilities(glp);
62 }
63
64 static GLWindow createWindow(final GLCapabilities caps, final int width, final int height)
65 throws InterruptedException
66 {
67 Assert.assertNotNull(caps);
68
69 //
70 // Create native windowing resources .. X11/Win/OSX
71 //
72 final GLWindow glWindow = GLWindow.create(caps);
73 glWindow.setUpdateFPSFrames(1, null);
74
75 final GLEventListener demo = new GearsES2();
76 setDemoFields(demo, glWindow);
77 glWindow.addGLEventListener(demo);
78 glWindow.addWindowListener(new TraceWindowAdapter());
79 glWindow.setSize(width, height);
80 return glWindow;
81 }
82
83 private void testDisplayCreate01Impl() throws InterruptedException {
84 // start-state == end-state
85 Assert.assertEquals(0,Display.getActiveDisplayNumber());
86
87 // Create Window, pending lazy native creation
88 final GLWindow window = createWindow(caps, width, height);
89 final Screen screen = window.getScreen();
90 final Display display = screen.getDisplay();
91 window.setPosition(xy_pos, xy_pos);
92
93 Assert.assertEquals(screen,window.getScreen());
94 Assert.assertEquals(0,Display.getActiveDisplayNumber());
95 Assert.assertEquals(0,display.getReferenceCount());
96 Assert.assertEquals(false,display.isNativeValid());
97 Assert.assertEquals(true,display.getEDTUtil().isRunning());
98 Assert.assertEquals(0,Screen.getActiveScreenNumber());
99 Assert.assertEquals(0,screen.getReferenceCount());
100 Assert.assertEquals(false,screen.isNativeValid());
101 Assert.assertEquals(false,window.isNativeValid());
102 Assert.assertEquals(false,window.isVisible());
103 Assert.assertTrue(NewtTestUtil.hasPositionMax2xInsetsOr64Pix(window, xy_pos, xy_pos));
104
105 // lazy native creation sequence: Display, Screen and Window
106 Assert.assertEquals(0, window.getTotalFPSFrames());
107 window.setVisible(true);
108
109 Assert.assertEquals(screen,window.getScreen());
110 Assert.assertEquals(1,Display.getActiveDisplayNumber());
111 Assert.assertEquals(1,display.getReferenceCount());
112 Assert.assertEquals(true,display.isNativeValid());
113 Assert.assertEquals(true,display.getEDTUtil().isRunning());
114 Assert.assertEquals(1,Screen.getActiveScreenNumber());
115 Assert.assertEquals(1,screen.getReferenceCount());
116 Assert.assertEquals(true,screen.isNativeValid());
117 Assert.assertEquals(true,window.isNativeValid());
118 Assert.assertEquals(true,window.isVisible());
119 Assert.assertTrue(NewtTestUtil.hasPositionMax2xInsetsOr64Pix(window, xy_pos, xy_pos));
120 System.err.println("Frames for setVisible(true) 1: "+window.getTotalFPSFrames());
121 Assert.assertTrue(0 < window.getTotalFPSFrames());
122
123 final RectangleImmutable screenBoundsInWinU = screen.getViewportInWindowUnits();
124 System.err.println("screenBoundsInWinU: "+screenBoundsInWinU);
125
126 while(window.getTotalFPSDuration()<1*durationPerTest) {
127 window.display();
128 Thread.sleep(100);
129 }
130 System.err.println("duration: "+window.getTotalFPSDuration());
131
132 // just make the Window invisible
133 window.setVisible(false);
134 Assert.assertEquals(true,window.isNativeValid());
135 Assert.assertEquals(false,window.isVisible());
136
137 // just make the Window visible again
138 window.resetFPSCounter();
139 Assert.assertEquals(0, window.getTotalFPSFrames());
140 window.setVisible(true);
141 Assert.assertEquals(true,window.isNativeValid());
142 Assert.assertEquals(true,window.isVisible());
143 Assert.assertTrue(NewtTestUtil.hasPositionMax2xInsetsOr64Pix(window, xy_pos, xy_pos));
144 System.err.println("Frames for setVisible(true) 1: "+window.getTotalFPSFrames());
145 Assert.assertTrue(0 < window.getTotalFPSFrames());
146
147 while(window.getTotalFPSDuration()<2*durationPerTest) {
148 window.display();
149 Thread.sleep(100);
150 }
151 System.err.println("duration: "+window.getTotalFPSDuration());
152
153 // destruction.. ref count down, but keep all
154 window.destroy();
155 Assert.assertTrue(NewtTestUtil.waitForRealized(window, false, null));
156 Assert.assertTrue(NewtTestUtil.waitForRealized(screen, false, null));
157
158 Assert.assertEquals(screen,window.getScreen());
159 Assert.assertEquals(0,Display.getActiveDisplayNumber());
160 Assert.assertEquals(0,display.getReferenceCount());
161 Assert.assertEquals(false,display.isNativeValid());
162 Assert.assertNotNull(display.getEDTUtil());
163 Assert.assertEquals(false,display.getEDTUtil().isRunning());
164 Assert.assertEquals(0,Screen.getActiveScreenNumber());
165 Assert.assertEquals(0,screen.getReferenceCount());
166 Assert.assertEquals(false,screen.isNativeValid());
167 Assert.assertNotNull(window.getScreen());
168 Assert.assertEquals(false,window.isNativeValid());
169 Assert.assertEquals(false,window.isVisible());
170
171 window.resetFPSCounter();
172 Assert.assertEquals(0, window.getTotalFPSFrames());
173
174 // a display call shall not change a thing
175 window.display();
176 Assert.assertEquals(0, window.getTotalFPSFrames());
177 Assert.assertEquals(false,window.isNativeValid());
178 Assert.assertEquals(false,window.isVisible());
179
180 // recover Window
181 window.setVisible(true);
182
183 Assert.assertEquals(screen,window.getScreen());
184 Assert.assertEquals(1,Display.getActiveDisplayNumber());
185 Assert.assertEquals(1,display.getReferenceCount());
186 Assert.assertEquals(true,display.isNativeValid());
187 Assert.assertEquals(true,display.getEDTUtil().isRunning());
188 Assert.assertEquals(1,Screen.getActiveScreenNumber());
189 Assert.assertEquals(1,screen.getReferenceCount());
190 Assert.assertEquals(true,screen.isNativeValid());
191 Assert.assertEquals(true,window.isNativeValid());
192 Assert.assertEquals(true,window.isVisible());
193 System.err.println("Frames for setVisible(true) 2: "+window.getTotalFPSFrames());
194 Assert.assertTrue(0 < window.getTotalFPSFrames());
195
196 while(window.getTotalFPSDuration()<1*durationPerTest) {
197 window.display();
198 Thread.sleep(100);
199 }
200 System.err.println("duration: "+window.getTotalFPSDuration());
201
202 window.destroy();
203 Assert.assertTrue(NewtTestUtil.waitForRealized(window, false, null));
204 Assert.assertTrue(NewtTestUtil.waitForRealized(screen, false, null));
205
206 Assert.assertEquals(screen,window.getScreen());
207 Assert.assertEquals(false,window.isNativeValid());
208 Assert.assertEquals(false,window.isVisible());
209
210 Display.dumpDisplayList("Post destroy(true)");
211
212 // end-state == start-state
213 Assert.assertEquals(0,Display.getActiveDisplayNumber());
214 Assert.assertEquals(0,display.getReferenceCount());
215 Assert.assertEquals(false,display.isNativeValid());
216 Assert.assertNotNull(display.getEDTUtil());
217 Assert.assertEquals(false,display.getEDTUtil().isRunning());
218 Assert.assertEquals(0,Screen.getActiveScreenNumber());
219 Assert.assertEquals(0,screen.getReferenceCount());
220 Assert.assertEquals(false,screen.isNativeValid());
221 }
222
223 @Test
224 public void testDisplayCreate01() throws InterruptedException {
225 Assert.assertEquals(0,Display.getActiveDisplayNumber());
226
227 // Create Display/Screen, pending lazy native creation
228 System.err.println("Pass - 1");
229 testDisplayCreate01Impl();
230 System.err.println("Pass - 2");
231 testDisplayCreate01Impl();
232
233 Assert.assertEquals(0,Display.getActiveDisplayNumber());
234 }
235
236 private void testDisplayCreate02Impl() throws InterruptedException {
237 // start-state == end-state
238 Assert.assertEquals(0,Display.getActiveDisplayNumber());
239
240 // Create Window, pending lazy native creation
241 final GLWindow window1 = createWindow(caps, width, height);
242 final Screen screen = window1.getScreen();
243 final Display display = screen.getDisplay();
244 window1.setPosition(xy_pos, xy_pos);
245
246 Assert.assertEquals(0,Display.getActiveDisplayNumber());
247 Assert.assertEquals(0,display.getReferenceCount());
248 Assert.assertEquals(false,display.isNativeValid());
249 Assert.assertEquals(true,display.getEDTUtil().isRunning());
250 Assert.assertEquals(0,Screen.getActiveScreenNumber());
251 Assert.assertEquals(0,screen.getReferenceCount());
252 Assert.assertEquals(false,screen.isNativeValid());
253 Assert.assertEquals(false,window1.isNativeValid());
254 Assert.assertEquals(false,window1.isVisible());
255 Assert.assertEquals(xy_pos,window1.getX());
256 Assert.assertEquals(xy_pos,window1.getY());
257
258 // lazy native creation sequence: Display, Screen and Window
259 Assert.assertEquals(0, window1.getTotalFPSFrames());
260 window1.setVisible(true);
261
262 Assert.assertEquals(1,Display.getActiveDisplayNumber());
263 Assert.assertEquals(1,display.getReferenceCount());
264 Assert.assertEquals(true,display.isNativeValid());
265 Assert.assertEquals(true,display.getEDTUtil().isRunning());
266 Assert.assertEquals(1,Screen.getActiveScreenNumber());
267 Assert.assertEquals(1,screen.getReferenceCount());
268 Assert.assertEquals(true,screen.isNativeValid());
269 Assert.assertEquals(true,window1.isNativeValid());
270 Assert.assertEquals(true,window1.isVisible());
271 Assert.assertEquals(xy_pos,window1.getX());
272 Assert.assertEquals(xy_pos,window1.getY());
273 System.err.println("Frames for setVisible(true) 1: "+window1.getTotalFPSFrames());
274 Assert.assertTrue(0 < window1.getTotalFPSFrames());
275
276 final RectangleImmutable screenBoundsInWinU = screen.getViewportInWindowUnits();
277 System.err.println("screenBoundsInWinU: "+screenBoundsInWinU);
278 final int x_pos2 = screenBoundsInWinU.getWidth()-xy_pos-width;
279
280 final GLWindow window2 = createWindow(caps, width, height);
281 Assert.assertSame(screen, window2.getScreen());
282 Assert.assertSame(display, window2.getScreen().getDisplay());
283 window2.setPosition(x_pos2, xy_pos);
284
285 Assert.assertEquals(false,window2.isNativeValid());
286 Assert.assertEquals(false,window2.isVisible());
287 Assert.assertEquals(x_pos2,window2.getX());
288 Assert.assertEquals(xy_pos,window2.getY());
289 Assert.assertEquals(0, window2.getTotalFPSFrames());
290 window2.setVisible(true);
291
292 Assert.assertEquals(1,Display.getActiveDisplayNumber());
293 Assert.assertEquals(1,display.getReferenceCount());
294 Assert.assertEquals(true,display.isNativeValid());
295 Assert.assertEquals(true,display.getEDTUtil().isRunning());
296 Assert.assertEquals(1,Screen.getActiveScreenNumber());
297 Assert.assertEquals(2,screen.getReferenceCount());
298 Assert.assertEquals(true,screen.isNativeValid());
299 Assert.assertEquals(true,window2.isNativeValid());
300 Assert.assertEquals(true,window2.isVisible());
301 Assert.assertEquals(x_pos2,window2.getX());
302 Assert.assertEquals(xy_pos,window2.getY());
303 System.err.println("Frames for setVisible(true) 2: "+window2.getTotalFPSFrames());
304 Assert.assertTrue(0 < window2.getTotalFPSFrames());
305
306 while(window1.getTotalFPSDuration()<1*durationPerTest) {
307 window1.display();
308 Thread.sleep(100);
309 }
310 System.err.println("duration: "+window1.getTotalFPSDuration());
311
312 // just make the Window invisible
313 window1.setVisible(false);
314 Assert.assertEquals(true,window1.isNativeValid());
315 Assert.assertEquals(false,window1.isVisible());
316 Assert.assertEquals(xy_pos,window1.getX());
317 Assert.assertEquals(xy_pos,window1.getY());
318
319 // destruction ...
320 window1.destroy();
321 Assert.assertTrue(NewtTestUtil.waitForRealized(window1, false, null));
322
323 Assert.assertNotNull(window1.getScreen());
324 Assert.assertEquals(false,window1.isNativeValid());
325 Assert.assertEquals(false,window1.isVisible());
326
327 Assert.assertEquals(1,Display.getActiveDisplayNumber());
328 Assert.assertEquals(1,display.getReferenceCount());
329 Assert.assertEquals(true,display.isNativeValid());
330 Assert.assertNotNull(display.getEDTUtil());
331 Assert.assertEquals(true,display.getEDTUtil().isRunning());
332 Assert.assertEquals(1,Screen.getActiveScreenNumber());
333 Assert.assertEquals(1,screen.getReferenceCount());
334 Assert.assertEquals(true,screen.isNativeValid());
335
336 // destruction
337 window2.destroy();
338 Assert.assertTrue(NewtTestUtil.waitForRealized(window2, false, null));
339 Assert.assertTrue(NewtTestUtil.waitForRealized(screen, false, null));
340
341 Assert.assertNotNull(window2.getScreen());
342 Assert.assertEquals(false,window2.isNativeValid());
343 Assert.assertEquals(false,window2.isVisible());
344
345 // end-state == start-state
346 Assert.assertEquals(0,Display.getActiveDisplayNumber());
347 Assert.assertEquals(0,display.getReferenceCount());
348 Assert.assertEquals(false,display.isNativeValid());
349 Assert.assertNotNull(display.getEDTUtil());
350 Assert.assertEquals(false,display.getEDTUtil().isRunning());
351 Assert.assertEquals(0,Screen.getActiveScreenNumber());
352 Assert.assertEquals(0,screen.getReferenceCount());
353 Assert.assertEquals(false,screen.isNativeValid());
354
355 // invalidate (again) ..
356 window1.destroy();
357 Assert.assertEquals(false,window1.isNativeValid());
358 Assert.assertEquals(false,window1.isVisible());
359
360 // invalidate (again) ..
361 window2.destroy();
362 Assert.assertEquals(false,window2.isNativeValid());
363 Assert.assertEquals(false,window2.isVisible());
364
365 }
366
367 // @Test
368 public void testDisplayCreate02() throws InterruptedException {
369 Assert.assertEquals(0,Display.getActiveDisplayNumber());
370
371 // Create Display/Screen, pending lazy native creation
372 System.err.println("Pass - 1");
373 testDisplayCreate02Impl();
374 System.err.println("Pass - 2");
375 testDisplayCreate02Impl();
376
377 Assert.assertEquals(0,Display.getActiveDisplayNumber());
378 }
379
380 public static void setDemoFields(final GLEventListener demo, final GLWindow glWindow) {
381 Assert.assertNotNull(demo);
382 Assert.assertNotNull(glWindow);
383 if(!MiscUtils.setFieldIfExists(demo, "window", glWindow)) {
384 MiscUtils.setFieldIfExists(demo, "glWindow", glWindow);
385 }
386 }
387
388 static int atoi(final String a) {
389 int i=0;
390 try {
391 i = Integer.parseInt(a);
392 } catch (final Exception ex) { ex.printStackTrace(); }
393 return i;
394 }
395
396 public static void main(final String args[]) throws IOException {
397 for(int i=0; i<args.length; i++) {
398 if(args[i].equals("-time")) {
399 durationPerTest = atoi(args[++i]);
400 }
401 }
402 System.err.println("durationPerTest: "+durationPerTest);
403 final String tstname = TestDisplayLifecycle02NEWT.class.getName();
404 org.junit.runner.JUnitCore.main(tstname);
405 }
406
407}
com.jogamp.newt.Display
Definition: Display.java:48
com.jogamp.newt.Display.getReferenceCount
abstract int getReferenceCount()
com.jogamp.newt.Display.getActiveDisplayNumber
static int getActiveDisplayNumber()
Definition: Display.java:452
com.jogamp.newt.Display.getEDTUtil
abstract EDTUtil getEDTUtil()
com.jogamp.newt.Display.isNativeValid
abstract boolean isNativeValid()
com.jogamp.newt.Display.dumpDisplayList
static void dumpDisplayList(final String prefix)
Definition: Display.java:357
com.jogamp.newt.Screen
A screen may span multiple MonitorDevices representing their combined virtual size.
Definition: Screen.java:58
com.jogamp.newt.Screen.getDisplay
abstract Display getDisplay()
com.jogamp.newt.Screen.getViewportInWindowUnits
abstract RectangleImmutable getViewportInWindowUnits()
See Coordinate System.
com.jogamp.newt.Screen.getActiveScreenNumber
static int getActiveScreenNumber()
Definition: Screen.java:419
com.jogamp.newt.Screen.getReferenceCount
abstract int getReferenceCount()
com.jogamp.newt.Screen.isNativeValid
abstract boolean isNativeValid()
com.jogamp.newt.event.TraceWindowAdapter
Definition: TraceWindowAdapter.java:31
com.jogamp.newt.opengl.GLWindow
An implementation of GLAutoDrawable and Window interface, using a delegated Window instance,...
Definition: GLWindow.java:121
com.jogamp.newt.opengl.GLWindow.isNativeValid
final boolean isNativeValid()
Definition: GLWindow.java:638
com.jogamp.newt.opengl.GLWindow.setPosition
final void setPosition(final int x, final int y)
Sets the location of the window's client area excluding insets (window decorations) in window units.
Definition: GLWindow.java:525
com.jogamp.newt.opengl.GLWindow.display
void display()
Definition: GLWindow.java:782
com.jogamp.newt.opengl.GLWindow.getScreen
final Screen getScreen()
Definition: GLWindow.java:287
com.jogamp.newt.opengl.GLWindow.getX
final int getX()
Returns the current x position of this window, relative to it's parent.
Definition: GLWindow.java:436
com.jogamp.newt.opengl.GLWindow.getY
final int getY()
Returns the current y position of the top-left corner of the client area relative to it's parent in w...
Definition: GLWindow.java:441
com.jogamp.newt.opengl.GLWindow.setSize
final void setSize(final int width, final int height)
Sets the size of the window's client area in window units, excluding decorations.
Definition: GLWindow.java:625
com.jogamp.newt.opengl.GLWindow.isVisible
final boolean isVisible()
Definition: GLWindow.java:549
com.jogamp.newt.opengl.GLWindow.setVisible
final void setVisible(final boolean visible)
Calls setVisible(true, visible), i.e.
Definition: GLWindow.java:615
com.jogamp.newt.opengl.GLWindow.addWindowListener
final void addWindowListener(final WindowListener l)
Appends the given com.jogamp.newt.event.WindowListener to the end of the list.
Definition: GLWindow.java:882
com.jogamp.newt.opengl.GLWindow.destroy
final void destroy()
Destroys all resources associated with this GLAutoDrawable, inclusive the GLContext.
Definition: GLWindow.java:605
com.jogamp.newt.opengl.GLWindow.create
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
com.jogamp.opengl.GLCapabilities
Specifies a set of OpenGL capabilities.
Definition: GLCapabilities.java:58
com.jogamp.opengl.GLProfile
Specifies the the OpenGL profile.
Definition: GLProfile.java:77
com.jogamp.opengl.GLProfile.getDefault
static GLProfile getDefault(final AbstractGraphicsDevice device)
Returns a default GLProfile object, reflecting the best for the running platform.
Definition: GLProfile.java:739
com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2
GearsES2.java
Definition: GearsES2.java:65
com.jogamp.opengl.test.junit.newt.TestDisplayLifecycle02NEWT
Definition: TestDisplayLifecycle02NEWT.java:52
com.jogamp.opengl.test.junit.newt.TestDisplayLifecycle02NEWT.initClass
static void initClass()
Definition: TestDisplayLifecycle02NEWT.java:59
com.jogamp.opengl.test.junit.newt.TestDisplayLifecycle02NEWT.setDemoFields
static void setDemoFields(final GLEventListener demo, final GLWindow glWindow)
Definition: TestDisplayLifecycle02NEWT.java:380
com.jogamp.opengl.test.junit.newt.TestDisplayLifecycle02NEWT.main
static void main(final String args[])
Definition: TestDisplayLifecycle02NEWT.java:396
com.jogamp.opengl.test.junit.newt.TestDisplayLifecycle02NEWT.testDisplayCreate02
void testDisplayCreate02()
Definition: TestDisplayLifecycle02NEWT.java:368
com.jogamp.opengl.test.junit.newt.TestDisplayLifecycle02NEWT.testDisplayCreate01
void testDisplayCreate01()
Definition: TestDisplayLifecycle02NEWT.java:224
com.jogamp.opengl.test.junit.util.MiscUtils
Definition: MiscUtils.java:47
com.jogamp.opengl.test.junit.util.MiscUtils.setFieldIfExists
static boolean setFieldIfExists(final Object instance, final String fieldName, final Object value)
Definition: MiscUtils.java:193
com.jogamp.opengl.test.junit.util.UITestCase
Definition: UITestCase.java:62
com.jogamp.nativewindow.util.RectangleImmutable
Immutable Rectangle interface, with its position on the top-left.
Definition: RectangleImmutable.java:36
com.jogamp.nativewindow.util.RectangleImmutable.getWidth
int getWidth()
com.jogamp.newt.util.EDTUtil.isRunning
boolean isRunning()
com.jogamp.opengl.FPSCounter.setUpdateFPSFrames
void setUpdateFPSFrames(int frames, PrintStream out)
com.jogamp.opengl.FPSCounter.getTotalFPSFrames
int getTotalFPSFrames()
com.jogamp.opengl.FPSCounter.resetFPSCounter
void resetFPSCounter()
Reset all performance counter (startTime, currentTime, frame number)
com.jogamp.opengl.FPSCounter.getTotalFPSDuration
long getTotalFPSDuration()
com.jogamp.opengl.GLAutoDrawable.addGLEventListener
void addGLEventListener(GLEventListener listener)
Adds the given listener to the end of this drawable queue.
com.jogamp.opengl.GLEventListener
Declares events which client code can use to manage OpenGL rendering into a GLAutoDrawable.
Definition: GLEventListener.java:47