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 --- .../jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java') diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java index 13bb24237..f8ba8d277 100644 --- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java +++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java @@ -373,6 +373,14 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl { final static String WGL_ARB_make_current_read = "WGL_ARB_make_current_read"; final static String wglMakeContextCurrent = "wglMakeContextCurrent"; + 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