Beispiel #1
0
 private void maybeDoSingleThreadedWorkaround(
     Runnable eventDispatchThreadAction, Runnable invokeGLAction, boolean isReshape) {
   if (Threading.isSingleThreaded() && !Threading.isOpenGLThread()) {
     Threading.invokeOnOpenGLThread(eventDispatchThreadAction);
   } else {
     drawableHelper.invokeGL(pbufferDrawable, context, invokeGLAction, initAction);
   }
 }
Beispiel #2
0
 public void destroy() {
   // FIXME: not calling event listeners .. see GLAutoDrawable spec
   if (Threading.isSingleThreaded() && !Threading.isOpenGLThread()) {
     Threading.invokeOnOpenGLThread(destroyAction);
   } else {
     destroyAction.run();
   }
 }