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/GLContextImpl.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/GLContextImpl.java')
-rw-r--r-- | src/classes/com/sun/opengl/impl/GLContextImpl.java | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/src/classes/com/sun/opengl/impl/GLContextImpl.java b/src/classes/com/sun/opengl/impl/GLContextImpl.java index d79de9f5a..0910fe250 100644 --- a/src/classes/com/sun/opengl/impl/GLContextImpl.java +++ b/src/classes/com/sun/opengl/impl/GLContextImpl.java @@ -123,15 +123,22 @@ public abstract class GLContextImpl extends GLContext { // If we are tracking creation and destruction of server-side // OpenGL objects, we must decrement the reference count of the // GLObjectTracker upon context destruction. - int res = makeCurrent(); - if (res != CONTEXT_CURRENT) { - // FIXME: we really need to behave better than this - throw new GLException("Unable to make context current to destroy tracked server-side OpenGL objects"); - } try { - tracker.unref(getGL()); - } finally { - release(); + int res = makeCurrent(); + if (res != CONTEXT_CURRENT) { + // FIXME: we really need to behave better than this + throw new GLException("Unable to make context current to destroy tracked server-side OpenGL objects"); + } + try { + tracker.unref(getGL()); + } finally { + release(); + } + } catch (GLException e) { + // FIXME: should probably do something more intelligent here + if (DEBUG) { + e.printStackTrace(); + } } } } |