summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/javax/media/opengl/awt
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-06-04 05:21:32 +0200
committerSven Gothel <[email protected]>2010-06-04 05:21:32 +0200
commit4512900ddcb9ce9a498411d257b1b6d6010ec006 (patch)
treeae9878c82cda41920f46ea639178f7d951d5af8f /src/jogl/classes/javax/media/opengl/awt
parent6bbf70d2f4a06b8aa0b100d83ed9aca6dd80040e (diff)
JOGL: Unify library loading (impl and binding), incl. lookup ; GLAutoDrawable: dispose() calls only with created context.
- Using the EGL approach of DynamicLookupHelper, now generalized in abstract GLDynamicLookupHelper, DesktopGLDynamicLookupHelper and EGLGLDynamicLookupHelper. The implementation of these are self contained. - Sharing common code. - Unifying implementation and binding loading, as well as the function lookup within the impl libs. - Removed DRIHack, since its no more required due to the new DesktopGLDynamicLookupHelper. - Removed compile time link to GL and GLU libs - Removed redundant library OS functions from X11/WGL bindings, GlueGen's common code is being used now. - GLAutoDrawable: dispose() calls only with created context. This cleans up stack traces in case of eventual bugs, where context creation is not successful.
Diffstat (limited to 'src/jogl/classes/javax/media/opengl/awt')
-rw-r--r--src/jogl/classes/javax/media/opengl/awt/GLCanvas.java8
-rw-r--r--src/jogl/classes/javax/media/opengl/awt/GLJPanel.java8
2 files changed, 10 insertions, 6 deletions
diff --git a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java
index 9932f0cf9..be42e1da1 100644
--- a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java
+++ b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java
@@ -320,11 +320,13 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable {
// The user really should not be invoking remove() from this
// thread -- but since he/she is, we can not go over to the
// EDT at this point. Try to destroy the context from here.
- drawableHelper.invokeGL(drawable, context, disposeAction, null);
- } else {
+ if(context.isCreated()) {
+ drawableHelper.invokeGL(drawable, context, disposeAction, null);
+ }
+ } else if(context.isCreated()) {
Threading.invokeOnOpenGLThread(disposeOnEventDispatchThreadAction);
}
- } else {
+ } else if(context.isCreated()) {
drawableHelper.invokeGL(drawable, context, disposeAction, null);
}
diff --git a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
index eb8c68263..61e1429b6 100644
--- a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
+++ b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
@@ -227,11 +227,13 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable {
// The user really should not be invoking remove() from this
// thread -- but since he/she is, we can not go over to the
// EDT at this point. Try to destroy the context from here.
- drawableHelper.invokeGL(disposeDrawable, disposeContext, disposeAction, null);
- } else {
+ if(disposeContext.isCreated()) {
+ drawableHelper.invokeGL(disposeDrawable, disposeContext, disposeAction, null);
+ }
+ } else if(disposeContext.isCreated()) {
Threading.invokeOnOpenGLThread(disposeOnEventDispatchThreadAction);
}
- } else {
+ } else if(disposeContext.isCreated()) {
drawableHelper.invokeGL(disposeDrawable, disposeContext, disposeAction, null);
}