summaryrefslogtreecommitdiffstats
path: root/src/classes/com/sun/opengl/impl/GLContextImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/classes/com/sun/opengl/impl/GLContextImpl.java')
-rw-r--r--src/classes/com/sun/opengl/impl/GLContextImpl.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/classes/com/sun/opengl/impl/GLContextImpl.java b/src/classes/com/sun/opengl/impl/GLContextImpl.java
index 5dbf08df6..d79de9f5a 100644
--- a/src/classes/com/sun/opengl/impl/GLContextImpl.java
+++ b/src/classes/com/sun/opengl/impl/GLContextImpl.java
@@ -66,9 +66,11 @@ public abstract class GLContextImpl extends GLContext {
public GLContextImpl(GLContext shareWith) {
setGL(createGL());
functionAvailability = new FunctionAvailabilityCache(this);
- if (shareWith != null || GLContextShareSet.isObjectTrackingDebuggingEnabled()) {
- GLContextShareSet.registerSharing(this, shareWith);
+ GLContext shareContext = Java2D.filterShareContext(shareWith);
+ if (shareContext != null) {
+ GLContextShareSet.registerSharing(this, shareContext);
}
+ GLContextShareSet.registerForObjectTracking(shareWith, this);
}
public int makeCurrent() throws GLException {