From 1bfa7a8f6e6dc5999e337aac2b9ddf118cf45a2f Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sun, 7 Aug 2011 07:53:46 +0200 Subject: GLProfile / eager init: Use relaxed query, if context was created while initialize shared --- .../classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java') diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java index 14f2a28f1..1caf1e24b 100644 --- a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java +++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java @@ -47,6 +47,7 @@ import javax.media.nativewindow.x11.*; import javax.media.opengl.*; import jogamp.opengl.*; + import com.jogamp.common.JogampRuntimeException; import com.jogamp.common.util.*; import jogamp.nativewindow.WrappedSurface; @@ -260,6 +261,14 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl { return false; } + public final boolean getWasSharedContextCreated(AbstractGraphicsDevice device) { + SharedResourceRunner.Resource sr = sharedResourceRunner.getOrCreateShared(device); + if(null!=sr) { + return null != sr.getContext(); + } + return false; + } + protected final GLContext getOrCreateSharedContextImpl(AbstractGraphicsDevice device) { SharedResourceRunner.Resource sr = sharedResourceRunner.getOrCreateShared(device); if(null!=sr) { -- cgit v1.2.3