diff options
author | Kenneth Russel <[email protected]> | 2006-02-11 01:11:57 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2006-02-11 01:11:57 +0000 |
commit | 8ebdef6860e34bf16b9b13c657f651bf9ce32ab3 (patch) | |
tree | e1b51b0c8cacf3987f219b2e992af089aea5d1b4 /src/classes/com/sun/opengl/impl/GLContextShareSet.java | |
parent | b75d4a3718b1a5744218e19c4f5c1a9ff0311f34 (diff) |
Further work on FBO support in Java2D/JOGL bridge. Upgraded JOGL's
Java2D class to latest proposed set of APIs in OGLUtilities and
changed usage of these APIs to be approximately correct. Left in
fallback path for working with non-FBO case in current Mustang builds.
Not working yet, and don't yet understand why; checking in at this
intermediate point to be able to more easily test on more machines.
Added error checking to creation of external GLContexts and
GLDrawables on Windows and X11 platforms.
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@597 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/classes/com/sun/opengl/impl/GLContextShareSet.java')
-rw-r--r-- | src/classes/com/sun/opengl/impl/GLContextShareSet.java | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/classes/com/sun/opengl/impl/GLContextShareSet.java b/src/classes/com/sun/opengl/impl/GLContextShareSet.java index 283a56f85..20a9364fb 100644 --- a/src/classes/com/sun/opengl/impl/GLContextShareSet.java +++ b/src/classes/com/sun/opengl/impl/GLContextShareSet.java @@ -39,6 +39,9 @@ package com.sun.opengl.impl; +import java.awt.GraphicsConfiguration; +import java.awt.GraphicsDevice; +import java.awt.GraphicsEnvironment; import java.lang.ref.*; import java.util.*; import javax.media.opengl.*; @@ -168,10 +171,20 @@ public class GLContextShareSet { GLContextImpl impl2 = (GLContextImpl) newContext; GLObjectTracker tracker = null; // Don't share object trackers with the primordial share context from Java2D - GLContext j2dShareContext = Java2D.getShareContext(); - if (impl1 != null && impl1 == j2dShareContext) { - impl1 = null; + if (Java2D.isOGLPipelineActive()) { + // FIXME: probably need to do something different here + // Need to be able to figure out the GraphicsDevice for the + // older context if it's on-screen + GraphicsConfiguration gc = GraphicsEnvironment. + getLocalGraphicsEnvironment(). + getDefaultScreenDevice(). + getDefaultConfiguration(); + GLContext j2dShareContext = Java2D.getShareContext(gc); + if (impl1 != null && impl1 == j2dShareContext) { + impl1 = null; + } } + if (impl1 != null) { tracker = impl1.getObjectTracker(); assert (tracker != null) |