From 97f4ef2763596993bcb8a6b84150c9ec906dde08 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 21 Jan 2014 18:56:32 +0100 Subject: Better shared GLAutoDrawable synchronization: Block slave instances to also block until all master's GLEventListener.init(..) methods have been called Better shared GLAutoDrawable synchronization. Block slave instances to also block until all master's GLEventListener.init(..) methods have been called - GLSharedContextSetter: Add areAllGLEventListenerInitialized() - GLCanvas (SWT, AWT) - GLJPanel - GLAutoDrawableBase (GLWindow, ..) - GLDrawableHelper's isSharedGLContextPending(..) takes 'areAllGLEventListenerInitialized()' into consideration allowing to block the slave creation until master is completed. This solves teh use case, where the master creates resources in it's GLEventListener initialization (buffers), which are shared with it's slaves. --- src/jogl/classes/jogamp/opengl/GLAutoDrawableBase.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/jogl/classes/jogamp/opengl/GLAutoDrawableBase.java') diff --git a/src/jogl/classes/jogamp/opengl/GLAutoDrawableBase.java b/src/jogl/classes/jogamp/opengl/GLAutoDrawableBase.java index 42d0a2ec4..7cd685d5a 100644 --- a/src/jogl/classes/jogamp/opengl/GLAutoDrawableBase.java +++ b/src/jogl/classes/jogamp/opengl/GLAutoDrawableBase.java @@ -509,6 +509,11 @@ public abstract class GLAutoDrawableBase implements GLAutoDrawable, GLStateKeepe return helper.getGLEventListener(index); } + @Override + public boolean areAllGLEventListenerInitialized() { + return helper.areAllGLEventListenerInitialized(); + } + @Override public boolean getGLEventListenerInitState(GLEventListener listener) { return helper.getGLEventListenerInitState(listener); -- cgit v1.2.3