aboutsummaryrefslogtreecommitdiffstats
path: root/src/classes/com/sun/opengl/impl/GLContextImpl.java
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2006-02-06 04:52:15 +0000
committerKenneth Russel <[email protected]>2006-02-06 04:52:15 +0000
commita302c87258a1a17dc0eef5ae112cb0d4357be238 (patch)
tree5068ba77f80cd112f741f8d3e2bc9d89537702bc /src/classes/com/sun/opengl/impl/GLContextImpl.java
parentced30725fdaa23c108605104d0d364055e629a63 (diff)
Further work on FBO support in Java2D/JOGL bridge. Recast how
GLObjectTrackers are specified between contexts and separated this from the maintenance of the GLContextShareSet, although the API (registerForObjectTracking) is in the GLContextShareSet class. If the Java2D/OpenGL pipeline and FBOs are active, causes all JOGL contexts created to share textures and display lists with a context from Java2D (currently acquired from a VolatileImage, but will probably need to change how this is done). GLObjectTrackers however are only shared between JOGL contexts where the user has explicitly requested sharing. This yields the expected semantics of server-side object deletion when the context is destroyed. Upgraded GLJPanel to handle FBO manipulation. Not working yet; more debugging necessary on Java2D side as well. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@585 232f8b59-042b-4e1e-8c03-345bb8c30851
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 {