From 4dfa5e34b5bbfc74dd9ca6ead89b23d12e7a1b01 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 29 Aug 2014 01:31:03 +0200 Subject: GLSharedContextSetter: Fix API doc and all html references (fix URL and complete notes in all implementations) --- .../javax/media/opengl/GLSharedContextSetter.java | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'src/jogl/classes/javax/media/opengl/GLSharedContextSetter.java') diff --git a/src/jogl/classes/javax/media/opengl/GLSharedContextSetter.java b/src/jogl/classes/javax/media/opengl/GLSharedContextSetter.java index 679898dca..526967d69 100644 --- a/src/jogl/classes/javax/media/opengl/GLSharedContextSetter.java +++ b/src/jogl/classes/javax/media/opengl/GLSharedContextSetter.java @@ -35,9 +35,12 @@ package javax.media.opengl; * and textures among OpenGL contexts is supported with this interface. *

*

- * A master {@link GLContext} is the {@link GLContext} which is created first, - * shared {@link GLContext} w/ this master are referred as slave {@link GLContext} - * and controls the shared object's lifecycle, i.e. their construction and destruction. + * A master {@link GLContext} is the {@link GLContext} which is created first. + * Subsequent shared {@link GLContext} w/ the master are referred as slave {@link GLContext}. + *

+ *

+ * Implementations of this interface control the slave's {@link GLContext} and {@link GLAutoDrawable} realization, + * i.e. the slave {@link GLAutoDrawable} will not be realized before their associated master. *

*

* Using the nearest or same {@link GLCapabilitiesImmutable#getVisualID(javax.media.nativewindow.VisualIDHolder.VIDType) visual ID} @@ -50,12 +53,17 @@ package javax.media.opengl; * At least this has been experienced w/ OSX 10.9. *

*

- * Be aware that the master {@link GLContext} and related resources - * shall not be destroyed before it's slave {@link GLContext} instances while they are using them.
- * Otherwise the OpenGL driver implementation may crash w/ SIGSEGV, since using already destroyed resources, - * e.g. OpenGL buffer objects, may not be validated by the driver!
+ * In general, destroying a master {@link GLContext} before their shared slaves + * shall be permissible, i.e. the OpenGL driver needs to handle pending destruction of shared resources. + * This is confirmed to work properly on most platform/driver combinations, + * see unit test com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextVBOES2NEWT3 and similar. *

*

+ * However, to avoid scenarios with buggy drivers, users may not destroy the + * master {@link GLContext} before its shared slave {@link GLContext} instances + * as long as they are using them.
+ * Otherwise the OpenGL driver may crash w/ SIGSEGV, due to using already destroyed shared resources, + * if not handling the pending destruction of the latter!
* Either proper lifecycle synchronization is implemented, e.g. by notifying the slaves about the loss of the shared resources, * or the slaves validate whether the resources are still valid. *

-- cgit v1.2.3