/** * @param shared returns the shared GLContext, based on set shared GLAutoDrawable * or GLContext. Maybe null if none is set. * @return true if initialization is pending due to a set shared GLAutoDrawable or GLContext * which is not ready yet. Otherwise false. */ public boolean isSharedGLContextPending(final GLContext[] shared) { final GLContext shareWith; final boolean pending; if ( null != sharedAutoDrawable ) { shareWith = sharedAutoDrawable.getContext(); pending = null == shareWith || !shareWith.isCreated() || !sharedAutoDrawable.areAllGLEventListenerInitialized(); } else { shareWith = sharedContext; pending = null != shareWith && !shareWith.isCreated(); } shared[0] = shareWith; return pending; }