summaryrefslogtreecommitdiffstats
path: root/src/jogl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-03-05 06:48:38 +0100
committerSven Gothel <[email protected]>2012-03-05 06:48:38 +0100
commitb67a89a364677732d0849780226972d7e40aa078 (patch)
tree8c1dc0c4237440829bd9a760ccffdbf213d22622 /src/jogl
parent90c46b1ef1f199ceb63e85c85e9ebeb919d49c4a (diff)
Fix GLWindow/SWT-GLCanvas: set context synchronized ; Misc Changes
Fix GLWindow/SWT-GLCanvas: set context synchronized - GLWindow fix commit a0177c8a1048683e5d43f4712f8f9e37091d4e85. Removed explicit recursive surface lock requires recursive context locking, otherwise concurrent rendering fails. The implicit recursive surface lock within context makeCurrent() is applied after the context lock itself. Misc Changes - Fix TestPBufferDeadlockAWT, which was not using the unique profile string reference
Diffstat (limited to 'src/jogl')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java3
-rw-r--r--src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java5
2 files changed, 6 insertions, 2 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java b/src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java
index 91f79793c..4ab465a8c 100644
--- a/src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java
+++ b/src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java
@@ -239,7 +239,8 @@ public class GLCanvas extends Canvas implements GLAutoDrawable {
drawable.setRealized(true);
context = drawable.createContext(shareWith);
-
+ context.setSynchronized(true);
+
/* Register SWT listeners (e.g. PaintListener) to render/resize GL surface. */
/* TODO: verify that these do not need to be manually de-registered when destroying the SWT component */
addPaintListener(new PaintListener() {
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java b/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java
index bee2b28f9..53043c3cc 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java
@@ -151,7 +151,10 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl {
if(DEBUG) {
System.err.println("EGLDrawableFactory.destroy("+shutdownType+"): "+sr.device.toString());
}
- EGLDisplayUtil.eglTerminate(sr.device.getHandle());
+ final long eglDisplay = sr.device.getHandle();
+ if(EGL.EGL_NO_DISPLAY != eglDisplay) {
+ EGLDisplayUtil.eglTerminate(eglDisplay);
+ }
}
sharedMap.clear();
sharedMap = null;