diff options
author | Kenneth Russel <[email protected]> | 2006-02-05 18:09:25 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2006-02-05 18:09:25 +0000 |
commit | ced30725fdaa23c108605104d0d364055e629a63 (patch) | |
tree | 05b00a2e9e623854b2e1262d038811d56282f45b /make/gl-impl-CustomJavaCode.java | |
parent | e3699308d1478ec35b2cc3fdcef2046a8b1b695f (diff) |
Intermediate checkin for FBO support in Java2D/JOGL bridge. Needed to
keep track of server-side OpenGL objects, like textures and display
lists, created by the end user to preserve the illusion of independent
contexts even though they will all share textures and display lists
with the Java2D OpenGL context in order to access its FBO. Added
GLObjectTracker class to track creation and destruction of these
objects and to support cleanup when the last referring context has
been destroyed. Modified GLContextShareSet to create and install
GLObjectTrackers when necessary and GLContext to ref and unref tracker
appropriately. Changed GlueGen's JavaPrologue and JavaEpilogue
directives (and their documentation) to perform argument name
substitution. Wrote documentation section on argument name
substitution and specified behavior for primitive arrays (converts to
string "array_name, array_name_offset" in substitution). Rephrased
GlueGen's RangeCheck directives in terms of JavaPrologue directives
and deleted old specialized code. Fixed bug in handling of VBO support
in GLConfiguration when JavaPrologue was present for affected
functions. Added JavaPrologue and JavaEpilogue directives to all
existing OpenGL routines creating server-side objects (though it's
possible some were missed) to call GLObjectTracker when necessary.
Added RangeCheck directives for these routines as well. Worked around
bug in JOGL demos where shutdownDemo() was being called more than once.
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@584 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'make/gl-impl-CustomJavaCode.java')
-rw-r--r-- | make/gl-impl-CustomJavaCode.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/make/gl-impl-CustomJavaCode.java b/make/gl-impl-CustomJavaCode.java index 7f4902c83..0e3762724 100644 --- a/make/gl-impl-CustomJavaCode.java +++ b/make/gl-impl-CustomJavaCode.java @@ -2,6 +2,11 @@ // query Vertex Buffer Object state private boolean inBeginEndPair; +// Tracks creation and destruction of server-side OpenGL objects when +// the Java2D/OpenGL pipeline is enabled and it is using frame buffer +// objects (FBOs) to do its rendering +private GLObjectTracker tracker; + public GLImpl(GLContextImpl context) { this._context = context; } @@ -37,6 +42,10 @@ public Object getPlatformGLExtensions() { return _context.getPlatformGLExtensions(); } +public void setObjectTracker(GLObjectTracker tracker) { + this.tracker = tracker; +} + // // Helpers for ensuring the correct amount of texture data // |