From 73654365e6147a5eabe8747e5f4802b1fba83829 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 8 Oct 2014 08:16:10 +0200 Subject: Bug 1088: Add GLRendererQuirks.NeedSharedObjectSync; Tests: Synchronize GL objects if GLRendererQuirks.NeedSharedObjectSync is set. GLSharedContextSetter#synchronization GL Object Synchronization Usually synchronization of shared GL objects should not be required, if the shared GL objects are created and immutable before concurrent usage. However, using drivers exposing GLRendererQuirks.NeedSharedObjectSync always require the user to synchronize access of shared GL objects. Synchronization can be avoided if accessing the shared GL objects exclusively via a queue or com.jogamp.common.util.Ringbuffer, see GLMediaPlayerImpl as an example. +++ GLRendererQuirks.NeedSharedObjectSync is set for all OSX versions +++ Handle GLRendererQuirks.NeedSharedObjectSync in user code! +++ All shared context tests passed on OSX 10.9.5, and GNU/Linux w/ Nvidia + Mesa/AMD driver. --- .../javax/media/opengl/GLSharedContextSetter.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/jogl/classes/javax/media') diff --git a/src/jogl/classes/javax/media/opengl/GLSharedContextSetter.java b/src/jogl/classes/javax/media/opengl/GLSharedContextSetter.java index 526967d69..b8aef126b 100644 --- a/src/jogl/classes/javax/media/opengl/GLSharedContextSetter.java +++ b/src/jogl/classes/javax/media/opengl/GLSharedContextSetter.java @@ -28,6 +28,8 @@ package javax.media.opengl; +import com.jogamp.opengl.GLRendererQuirks; + /** * Adds capabilities to set a shared {@link GLContext} directly or via an {@link GLAutoDrawable}. *

@@ -88,6 +90,20 @@ package javax.media.opengl; glad.setVisible(true); // GLWindow creation .. * *

+ *
GL Object Synchronization
+ *

+ * Usually synchronization of shared GL objects should not be required, if the shared GL objects + * are created and immutable before concurrent usage. + *

+ *

+ * However, using drivers exposing {@link GLRendererQuirks#NeedSharedObjectSync} always + * require the user to synchronize access of shared GL objects. + *

+ *

+ * Synchronization can be avoided if accessing the shared GL objects + * exclusively via a queue or {@link com.jogamp.common.util.Ringbuffer Ringbuffer}, see GLMediaPlayerImpl as an example. + *

+ *

*
Known Driver Issues
* Intel's Mesa >= 9.1.2 Backend for [Sandybridge/Ivybridge] on GNU/Linux *

-- cgit v1.2.3