From 8ebdef6860e34bf16b9b13c657f651bf9ce32ab3 Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Sat, 11 Feb 2006 01:11:57 +0000 Subject: 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 --- src/classes/com/sun/opengl/impl/GLContextImpl.java | 23 ++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'src/classes/com/sun/opengl/impl/GLContextImpl.java') 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(); + } } } } -- cgit v1.2.3