From 88eef9e4eae8e63762252f1d11bca2bd0fde809b Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 6 Aug 2014 05:59:08 +0200 Subject: Bug 1039 - Specify behavior of GLEventListener Exceptions occurring while GLAutoDrawable processing [part-3] Add GLAnimatorControl.UncaughtGLAnimatorExceptionHandler interface to optionally handle uncaught exception within an animator thread by the user. Implementation also requires to flush all enqueued GLRunnable instances via GLAutoDrawable.invoked(..) in case such exception occurs. Hence 'GLAutoDrawable.flushGLRunnables()' has been added. Only subsequent exceptions, which cannot be thrown are dumped to System.stderr. +++ Handling of exceptions during dispose() Exception in NEWT's disposeGL*() are also caught and re-thrown after the NEWT window has been destroyed in WindowImpl.destroyAction: - GLEventListener.dispose(..) - GLDrawableHelper.disposeAllGLEventListener(..) - GLDrawableHelper.disposeGL(..) - GLAutoDrawableBase.destroyImplInLock(..) - GLWindow.GLLifecycleHook.destroyActionInLock(..) - WindowImpl.destroyAction on NEWT-EDT - WindowImpl.destroy Further more, exceptions occuring in native windowing toolkit triggered destroy() are ignored: - GLAutoDrawableBase.defaultWindowDestroyNotifyOp(..) It has to be seen whether such exception handling for dispose() shall be added to AWT/SWT. +++ TestGLException01NEWT covers all GLEventListener exception cases on-thread and off-thread (via animator). +++ --- src/jogl/classes/javax/media/opengl/GLDrawable.java | 1 + 1 file changed, 1 insertion(+) (limited to 'src/jogl/classes/javax/media/opengl/GLDrawable.java') diff --git a/src/jogl/classes/javax/media/opengl/GLDrawable.java b/src/jogl/classes/javax/media/opengl/GLDrawable.java index ac8644640..7ed057ea4 100644 --- a/src/jogl/classes/javax/media/opengl/GLDrawable.java +++ b/src/jogl/classes/javax/media/opengl/GLDrawable.java @@ -201,6 +201,7 @@ public interface GLDrawable extends NativeSurfaceHolder {

@return The immutable queried instance. @see #getChosenGLCapabilities() + @since 2.2 */ public GLCapabilitiesImmutable getRequestedGLCapabilities(); -- cgit v1.2.3