JOGL v2.6.0-rc-20250712
JOGL, High-Performance Graphics Binding for Java™ (public API).
TestSharedContextVBOES2NEWT3.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.jogl.acore;
30
31import java.util.List;
32
33import com.jogamp.newt.opengl.GLWindow;
34
35import com.jogamp.nativewindow.util.InsetsImmutable;
36import com.jogamp.opengl.GLCapabilities;
37import com.jogamp.opengl.GLContext;
38import com.jogamp.opengl.GLProfile;
39
40import com.jogamp.opengl.util.Animator;
41import com.jogamp.opengl.test.junit.util.GLTestUtil;
42import com.jogamp.opengl.test.junit.util.MiscUtils;
43import com.jogamp.opengl.test.junit.util.NewtTestUtil;
44import com.jogamp.opengl.test.junit.util.UITestCase;
45import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
46
47import org.junit.Assert;
48import org.junit.BeforeClass;
49import org.junit.Test;
50import org.junit.FixMethodOrder;
51import org.junit.runners.MethodSorters;
52
53/**
54 * Sharing the VBO of 3 GearsES2 instances, each in their own GLWindow.
55 * <p>
56 * This is achieved by using the 1st GLWindow as the <i>master</i>
57 * and synchronizing via GLSharedContextSetter to postpone creation
58 * of the 2nd and 3rd GLWindow until the 1st GLWindow's GLContext becomes created.
59 * </p>
60 * <p>
61 * Above method allows random creation of the 1st GLWindow, which triggers
62 * creation of the <i>dependent</i> other GLWindow sharing it's GLContext.
63 * </p>
64 */
65@FixMethodOrder(MethodSorters.NAME_ASCENDING)
67 static GLProfile glp;
68 static GLCapabilities caps;
69 static int width, height;
70
71 @BeforeClass
72 public static void initClass() {
75 Assert.assertNotNull(glp);
76 caps = new GLCapabilities(glp);
77 Assert.assertNotNull(caps);
78 width = 256;
79 height = 256;
80 } else {
81 setTestSupported(false);
82 }
83 }
84
85 protected GLWindow createGLWindow(final int x, final int y, final GearsES2 gears) throws InterruptedException {
86 final GLWindow glWindow = GLWindow.create(caps);
87 Assert.assertNotNull(glWindow);
88 glWindow.setPosition(x, y);
89 glWindow.setTitle("Shared Gears NEWT Test: "+x+"/"+y+" shared true");
90 glWindow.setSize(width, height);
91 glWindow.addGLEventListener(gears);
92
93 return glWindow;
94 }
95
96 @Test
97 public void test01SyncedOneAnimatorCleanDtorOrderCopyBuffer() throws InterruptedException {
98 syncedOneAnimator(true, false);
99 }
100 @Test
101 public void test02SyncedOneAnimatorCleanDtorOrderMapBuffer() throws InterruptedException {
102 syncedOneAnimator(true, true);
103 }
104
105 @Test
106 public void test03SyncedOneAnimatorDirtyDtorOrderCopyBuffer() throws InterruptedException {
107 syncedOneAnimator(false, false);
108 }
109 @Test
110 public void test04SyncedOneAnimatorDirtyDtorOrderMapBuffer() throws InterruptedException {
111 syncedOneAnimator(false, true);
112 }
113
114 public void syncedOneAnimator(final boolean destroyCleanOrder, final boolean useMappedBuffers) throws InterruptedException {
115 final Animator animator = new Animator(0 /* w/o AWT */);
116 animator.start();
117
118 final GearsES2 g1 = new GearsES2(0);
119 g1.setUseMappedBuffers(useMappedBuffers);
120 g1.setValidateBuffers(true);
121 final GLWindow f1 = createGLWindow(0, 0, g1);
122 animator.add(f1);
123 final InsetsImmutable insets = f1.getInsets();
124
125 final GearsES2 g2 = new GearsES2(0);
126 g2.setSharedGears(g1);
127 final GLWindow f2 = createGLWindow(f1.getX()+width+insets.getTotalWidth(),
128 f1.getY()+0, g2);
129 f2.setSharedAutoDrawable(f1);
130 animator.add(f2);
131 f2.setVisible(true); // shall wait until f1 is ready
132
133 Assert.assertTrue(NewtTestUtil.waitForRealized(f1, false, null));
134 Assert.assertTrue(NewtTestUtil.waitForVisible(f1, false, null));
135 Assert.assertTrue(GLTestUtil.waitForContextCreated(f1, false, null));
136
137 Assert.assertTrue(NewtTestUtil.waitForRealized(f2, true, null));
138 Assert.assertTrue(NewtTestUtil.waitForVisible(f2, true, null));
139 Assert.assertTrue(GLTestUtil.waitForContextCreated(f2, false, null));
140
141 f1.setVisible(true); // kicks off f1 GLContext .. and hence gears of f2 + f3 completion
142
143 Assert.assertTrue(NewtTestUtil.waitForRealized(f1, true, null));
144 Assert.assertTrue(NewtTestUtil.waitForVisible(f1, true, null));
145 Assert.assertTrue(GLTestUtil.waitForContextCreated(f1, true, null));
146 Assert.assertTrue("Gears1 not initialized", g1.waitForInit(true));
147
148 Assert.assertTrue(NewtTestUtil.waitForRealized(f2, true, null));
149 Assert.assertTrue(NewtTestUtil.waitForVisible(f2, true, null));
150 Assert.assertTrue(GLTestUtil.waitForContextCreated(f2, true, null));
151 Assert.assertTrue("Gears2 not initialized", g2.waitForInit(true));
152
153 final GearsES2 g3 = new GearsES2(0);
154 g3.setSharedGears(g1);
155 final GLWindow f3 = createGLWindow(f1.getX()+0,
156 f1.getY()+height+insets.getTotalHeight(), g3);
157 f3.setSharedAutoDrawable(f1);
158 animator.add(f3);
159 f3.setVisible(true); // shall wait until f1 is ready
160
161 Assert.assertTrue(NewtTestUtil.waitForRealized(f3, true, null));
162 Assert.assertTrue(NewtTestUtil.waitForVisible(f3, true, null));
163 Assert.assertTrue(GLTestUtil.waitForContextCreated(f3, true, null));
164 Assert.assertTrue("Gears3 not initialized", g3.waitForInit(true));
165
166 final GLContext ctx1 = f1.getContext();
167 final GLContext ctx2 = f2.getContext();
168 final GLContext ctx3 = f3.getContext();
169 {
170 final List<GLContext> ctx1Shares = ctx1.getCreatedShares();
171 final List<GLContext> ctx2Shares = ctx2.getCreatedShares();
172 final List<GLContext> ctx3Shares = ctx3.getCreatedShares();
173 MiscUtils.dumpSharedGLContext("XXX-C-3.1", ctx1);
174 MiscUtils.dumpSharedGLContext("XXX-C-3.2", ctx2);
175 MiscUtils.dumpSharedGLContext("XXX-C-3.3", ctx3);
176
177 Assert.assertTrue("Ctx1 is not shared", ctx1.isShared());
178 Assert.assertTrue("Ctx2 is not shared", ctx2.isShared());
179 Assert.assertTrue("Ctx3 is not shared", ctx3.isShared());
180 Assert.assertEquals("Ctx1 has unexpected number of created shares", 2, ctx1Shares.size());
181 Assert.assertEquals("Ctx2 has unexpected number of created shares", 2, ctx2Shares.size());
182 Assert.assertEquals("Ctx3 has unexpected number of created shares", 2, ctx3Shares.size());
183 Assert.assertEquals("Ctx1 Master Context is different", ctx1, ctx1.getSharedMaster());
184 Assert.assertEquals("Ctx2 Master Context is different", ctx1, ctx2.getSharedMaster());
185 Assert.assertEquals("Ctx3 Master Context is different", ctx1, ctx3.getSharedMaster());
186 }
187
188 Assert.assertTrue("Gears1 is shared", !g1.usesSharedGears());
189 Assert.assertTrue("Gears2 is not shared", g2.usesSharedGears());
190 Assert.assertTrue("Gears3 is not shared", g3.usesSharedGears());
191
192 try {
193 Thread.sleep(duration);
194 } catch(final Exception e) {
195 e.printStackTrace();
196 }
197
198 if( destroyCleanOrder ) {
199 System.err.println("XXX Destroy in clean order NOW");
200 f3.destroy();
201 try { Thread.sleep(durationPostDestroy); } catch(final Exception e) { e.printStackTrace(); }
202 f2.destroy();
203 try { Thread.sleep(durationPostDestroy); } catch(final Exception e) { e.printStackTrace(); }
204 f1.destroy();
205 try { Thread.sleep(durationPostDestroy); } catch(final Exception e) { e.printStackTrace(); }
206 } else {
207 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.");
208 animator.pause();
209 f1.destroy();
210 animator.resume();
211 try { Thread.sleep(durationPostDestroy); } catch(final Exception e) { e.printStackTrace(); }
212
213 animator.pause();
214 f2.destroy();
215 animator.resume();
216 try { Thread.sleep(durationPostDestroy); } catch(final Exception e) { e.printStackTrace(); }
217
218 f3.destroy();
219 try { Thread.sleep(durationPostDestroy); } catch(final Exception e) { e.printStackTrace(); }
220 }
221 Assert.assertTrue(NewtTestUtil.waitForVisible(f1, false, null));
222 Assert.assertTrue(NewtTestUtil.waitForRealized(f1, false, null));
223 Assert.assertTrue(NewtTestUtil.waitForVisible(f2, false, null));
224 Assert.assertTrue(NewtTestUtil.waitForRealized(f2, false, null));
225 Assert.assertTrue(NewtTestUtil.waitForVisible(f3, false, null));
226 Assert.assertTrue(NewtTestUtil.waitForRealized(f3, false, null));
227
228 animator.stop();
229 {
230 final List<GLContext> ctx1Shares = ctx1.getCreatedShares();
231 final List<GLContext> ctx2Shares = ctx2.getCreatedShares();
232 final List<GLContext> ctx3Shares = ctx3.getCreatedShares();
233 MiscUtils.dumpSharedGLContext("XXX-C-3.1", ctx1);
234 MiscUtils.dumpSharedGLContext("XXX-C-3.2", ctx2);
235 MiscUtils.dumpSharedGLContext("XXX-C-3.3", ctx3);
236
237 Assert.assertTrue("Ctx1 is shared", !ctx1.isShared());
238 Assert.assertTrue("Ctx2 is shared", !ctx2.isShared());
239 Assert.assertTrue("Ctx3 is shared", !ctx3.isShared());
240 Assert.assertEquals("Ctx1 has unexpected number of created shares", 0, ctx1Shares.size());
241 Assert.assertEquals("Ctx2 has unexpected number of created shares", 0, ctx2Shares.size());
242 Assert.assertEquals("Ctx3 has unexpected number of created shares", 0, ctx3Shares.size());
243 Assert.assertEquals("Ctx1 Master Context is set", null, ctx1.getSharedMaster());
244 Assert.assertEquals("Ctx2 Master Context is set", null, ctx2.getSharedMaster());
245 Assert.assertEquals("Ctx3 Master Context is set", null, ctx3.getSharedMaster());
246 }
247 }
248
249 @Test
250 public void test11ASyncEachAnimatorCleanDtorOrderCopyBuffer() throws InterruptedException {
251 asyncEachAnimator(true, false);
252 }
253 @Test
254 public void test12ASyncEachAnimatorCleanDtorOrderMapBuffer() throws InterruptedException {
255 asyncEachAnimator(true, true);
256 }
257
258 @Test
259 public void test13AsyncEachAnimatorDirtyDtorOrderCopyBuffers() throws InterruptedException {
260 asyncEachAnimator(false, false);
261 }
262 @Test
263 public void test14AsyncEachAnimatorDirtyDtorOrderMapBuffers() throws InterruptedException {
264 asyncEachAnimator(false, true);
265 }
266
267 public void asyncEachAnimator(final boolean destroyCleanOrder, final boolean useMappedBuffers) throws InterruptedException {
268 final Animator a1 = new Animator(0 /* w/o AWT */);
269 final GearsES2 g1 = new GearsES2(0);
270 g1.setSyncObjects(g1); // this is master, since rendered we must use it as sync
271 g1.setUseMappedBuffers(useMappedBuffers);
272 g1.setValidateBuffers(true);
273 final GLWindow f1 = createGLWindow(0, 0, g1);
274 a1.add(f1);
275 a1.start();
276
277 final InsetsImmutable insets = f1.getInsets();
278
279 final Animator a2 = new Animator(0 /* w/o AWT */);
280 final GearsES2 g2 = new GearsES2(0);
281 g2.setSharedGears(g1); // also uses master g1 as sync, if required
282 final GLWindow f2 = createGLWindow(f1.getX()+width+insets.getTotalWidth(),
283 f1.getY()+0, g2);
284 f2.setSharedAutoDrawable(f1);
285 a2.add(f2);
286 a2.start();
287 f2.setVisible(true);
288
289 Assert.assertTrue(NewtTestUtil.waitForRealized(f1, false, null));
290 Assert.assertTrue(NewtTestUtil.waitForVisible(f1, false, null));
291 Assert.assertTrue(GLTestUtil.waitForContextCreated(f1, false, null));
292
293 Assert.assertTrue(NewtTestUtil.waitForRealized(f2, true, null));
294 Assert.assertTrue(NewtTestUtil.waitForVisible(f2, true, null));
295 Assert.assertTrue(GLTestUtil.waitForContextCreated(f2, false, null));
296
297 f1.setVisible(true); // test pending creation of f2
298
299 Assert.assertTrue(NewtTestUtil.waitForRealized(f1, true, null));
300 Assert.assertTrue(NewtTestUtil.waitForVisible(f1, true, null));
301 Assert.assertTrue(GLTestUtil.waitForContextCreated(f1, true, null));
302 Assert.assertTrue("Gears1 not initialized", g1.waitForInit(true));
303
304 Assert.assertTrue(NewtTestUtil.waitForRealized(f2, true, null));
305 Assert.assertTrue(NewtTestUtil.waitForVisible(f2, true, null));
306 Assert.assertTrue(GLTestUtil.waitForContextCreated(f2, true, null));
307 Assert.assertTrue("Gears2 not initialized", g2.waitForInit(true));
308
309 final Animator a3 = new Animator(0 /* w/o AWT */);
310 final GearsES2 g3 = new GearsES2(0);
311 g3.setSharedGears(g1); // also uses master g1 as sync, if required
312 final GLWindow f3 = createGLWindow(f1.getX()+0,
313 f1.getY()+height+insets.getTotalHeight(), g3);
314 f3.setSharedAutoDrawable(f1);
315 a3.add(f3);
316 a3.start();
317 f3.setVisible(true);
318
319 Assert.assertTrue(NewtTestUtil.waitForRealized(f3, true, null));
320 Assert.assertTrue(NewtTestUtil.waitForVisible(f3, true, null));
321 Assert.assertTrue(GLTestUtil.waitForContextCreated(f3, true, null));
322 Assert.assertTrue("Gears3 not initialized", g3.waitForInit(true));
323
324 final GLContext ctx1 = f1.getContext();
325 final GLContext ctx2 = f2.getContext();
326 final GLContext ctx3 = f3.getContext();
327 {
328 final List<GLContext> ctx1Shares = ctx1.getCreatedShares();
329 final List<GLContext> ctx2Shares = ctx2.getCreatedShares();
330 final List<GLContext> ctx3Shares = ctx3.getCreatedShares();
331 MiscUtils.dumpSharedGLContext("XXX-C-3.1", ctx1);
332 MiscUtils.dumpSharedGLContext("XXX-C-3.2", ctx2);
333 MiscUtils.dumpSharedGLContext("XXX-C-3.3", ctx3);
334
335 Assert.assertTrue("Ctx1 is not shared", ctx1.isShared());
336 Assert.assertTrue("Ctx2 is not shared", ctx2.isShared());
337 Assert.assertTrue("Ctx3 is not shared", ctx3.isShared());
338 Assert.assertEquals("Ctx1 has unexpected number of created shares", 2, ctx1Shares.size());
339 Assert.assertEquals("Ctx2 has unexpected number of created shares", 2, ctx2Shares.size());
340 Assert.assertEquals("Ctx3 has unexpected number of created shares", 2, ctx3Shares.size());
341 Assert.assertEquals("Ctx1 Master Context is different", ctx1, ctx1.getSharedMaster());
342 Assert.assertEquals("Ctx2 Master Context is different", ctx1, ctx2.getSharedMaster());
343 Assert.assertEquals("Ctx3 Master Context is different", ctx1, ctx3.getSharedMaster());
344 }
345
346 Assert.assertTrue("Gears1 is shared", !g1.usesSharedGears());
347 Assert.assertTrue("Gears2 is not shared", g2.usesSharedGears());
348 Assert.assertTrue("Gears3 is not shared", g3.usesSharedGears());
349
350 try {
351 Thread.sleep(duration);
352 } catch(final Exception e) {
353 e.printStackTrace();
354 }
355
356 if( destroyCleanOrder ) {
357 System.err.println("XXX Destroy in clean order NOW");
358 a3.stop();
359 f3.destroy();
360 try { Thread.sleep(durationPostDestroy); } catch(final Exception e) { e.printStackTrace(); }
361 a2.stop();
362 f2.destroy();
363 try { Thread.sleep(durationPostDestroy); } catch(final Exception e) { e.printStackTrace(); }
364 a1.stop();
365 f1.destroy();
366 try { Thread.sleep(durationPostDestroy); } catch(final Exception e) { e.printStackTrace(); }
367 } else {
368 System.err.println("XXX Destroy in creation order NOW - Driver Impl. May trigger driver Bug i.e. not postponing GL ctx destruction after releasing all refs.");
369 a1.stop();
370 a2.pause();
371 a3.pause();
372 f1.destroy();
373 a2.resume();
374 a3.resume();
375 try { Thread.sleep(durationPostDestroy); } catch(final Exception e) { e.printStackTrace(); }
376
377 a2.stop();
378 a3.pause();
379 f2.destroy();
380 a3.resume();
381 try { Thread.sleep(durationPostDestroy); } catch(final Exception e) { e.printStackTrace(); }
382
383 a3.stop();
384 f3.destroy();
385 try { Thread.sleep(durationPostDestroy); } catch(final Exception e) { e.printStackTrace(); }
386 }
387 Assert.assertTrue(NewtTestUtil.waitForVisible(f1, false, null));
388 Assert.assertTrue(NewtTestUtil.waitForRealized(f1, false, null));
389 Assert.assertTrue(NewtTestUtil.waitForVisible(f2, false, null));
390 Assert.assertTrue(NewtTestUtil.waitForRealized(f2, false, null));
391 Assert.assertTrue(NewtTestUtil.waitForVisible(f3, false, null));
392 Assert.assertTrue(NewtTestUtil.waitForRealized(f3, false, null));
393 }
394
395 static long duration = 1000; // ms - ~60 frames
396 static long durationPostDestroy = 170; // ms - ~10 frames post destroy
397 static boolean mainRun = false;
398
399 public static void main(final String args[]) {
400 mainRun = true;
401 for(int i=0; i<args.length; i++) {
402 if(args[i].equals("-time")) {
403 i++;
404 try {
405 duration = Integer.parseInt(args[i]);
406 } catch (final Exception ex) { ex.printStackTrace(); }
407 }
408 }
409 /**
410 BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
411 System.err.println("Press enter to continue");
412 System.err.println(stdin.readLine()); */
413 org.junit.runner.JUnitCore.main(TestSharedContextVBOES2NEWT3.class.getName());
414 }
415}
An implementation of GLAutoDrawable and Window interface, using a delegated Window instance,...
Definition: GLWindow.java:121
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
final void setTitle(final String title)
Definition: GLWindow.java:297
final int getX()
Returns the current x position of this window, relative to it's parent.
Definition: GLWindow.java:436
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
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
final void setVisible(final boolean visible)
Calls setVisible(true, visible), i.e.
Definition: GLWindow.java:615
final InsetsImmutable getInsets()
Returns the insets defined as the width and height of the window decoration on the left,...
Definition: GLWindow.java:431
final void destroy()
Destroys all resources associated with this GLAutoDrawable, inclusive the GLContext.
Definition: GLWindow.java:605
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.
Abstraction for an OpenGL rendering context.
Definition: GLContext.java:74
final boolean isShared()
Returns true if this GLContext is shared, otherwise false.
Definition: GLContext.java:261
final GLContext getSharedMaster()
Returns the shared master GLContext of this GLContext if shared, otherwise return null.
Definition: GLContext.java:272
final List< GLContext > getCreatedShares()
Returns a new list of created GLContext shared with this GLContext.
Definition: GLContext.java:277
Specifies the the OpenGL profile.
Definition: GLProfile.java:77
static boolean isAvailable(final AbstractGraphicsDevice device, final String profile)
Returns the availability of a profile on a device.
Definition: GLProfile.java:305
static final String GL2ES2
The intersection of the desktop GL3, GL2 and embedded ES2 profile.
Definition: GLProfile.java:594
static GLProfile get(final AbstractGraphicsDevice device, String profile)
Returns a GLProfile object.
Sharing the VBO of 3 GearsES2 instances, each in their own GLWindow.
GLWindow createGLWindow(final int x, final int y, final GearsES2 gears)
void asyncEachAnimator(final boolean destroyCleanOrder, final boolean useMappedBuffers)
void syncedOneAnimator(final boolean destroyCleanOrder, final boolean useMappedBuffers)
boolean waitForInit(final boolean initialized)
Definition: GearsES2.java:187
static boolean waitForContextCreated(final GLAutoDrawable autoDrawable, final boolean created, final Runnable waitAction)
Definition: GLTestUtil.java:42
static void dumpSharedGLContext(final String prefix, final GLContext self)
Definition: MiscUtils.java:271
static boolean waitForRealized(final Screen screen, final boolean realized, final Runnable waitAction)
static boolean waitForVisible(final Window win, final boolean visible, final Runnable waitAction)
final synchronized void add(final GLAutoDrawable drawable)
Adds a drawable to this animator's list of rendering drawables.
final synchronized boolean pause()
Pauses this animator.
Definition: Animator.java:382
final synchronized boolean resume()
Resumes animation if paused.
Definition: Animator.java:397
final synchronized boolean start()
Starts this animator, if not running.
Definition: Animator.java:344
final synchronized boolean stop()
Stops this animator.
Definition: Animator.java:368
Immutable insets representing rectangular window decoration insets on all four edges in window units.
void addGLEventListener(GLEventListener listener)
Adds the given listener to the end of this drawable queue.
GLContext getContext()
Returns the context associated with this drawable.