aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-12-18 03:35:27 +0100
committerSven Gothel <[email protected]>2010-12-18 03:35:27 +0100
commitba015ce215861f2059200dddd2f14253c2651cfe (patch)
treeb8ca2e873a40f9ed060063f05f2def7d3cf73052
parentd2f790f0fdc58bfdce66ceced3712cece26df4d5 (diff)
convenient internal queries for shared
-rw-r--r--src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java12
1 files changed, 12 insertions, 0 deletions
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) {