From ba015ce215861f2059200dddd2f14253c2651cfe Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sat, 18 Dec 2010 03:35:27 +0100 Subject: convenient internal queries for shared --- .../opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src') diff --git a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java index 3defe5d53..cd39ddc15 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java @@ -265,6 +265,18 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl { final static String WGL_ARB_make_current_read = "WGL_ARB_make_current_read"; final static String wglMakeContextCurrent = "wglMakeContextCurrent"; + protected final GLContext getSharedContextImpl(AbstractGraphicsDevice device) { + SharedResourceRunner.Resource sr = sharedResourceRunner.getShared(device); + if(null!=sr) { + return sr.getContext(); + } + return null; + } + + protected final boolean hasSharedContextImpl(AbstractGraphicsDevice device) { + return null != getSharedContextImpl(device); + } + protected final GLContext getOrCreateSharedContextImpl(AbstractGraphicsDevice device) { SharedResourceRunner.Resource sr = sharedResourceRunner.getOrCreateShared(device); if(null!=sr) { -- cgit v1.2.3