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/x11/X11ExternalGLDrawable.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/classes/com/sun/opengl/impl/x11/X11ExternalGLDrawable.java') diff --git a/src/classes/com/sun/opengl/impl/x11/X11ExternalGLDrawable.java b/src/classes/com/sun/opengl/impl/x11/X11ExternalGLDrawable.java index e8fc069ba..10e58d3a0 100755 --- a/src/classes/com/sun/opengl/impl/x11/X11ExternalGLDrawable.java +++ b/src/classes/com/sun/opengl/impl/x11/X11ExternalGLDrawable.java @@ -55,6 +55,9 @@ public class X11ExternalGLDrawable extends X11GLDrawable { display = GLX.glXGetCurrentDisplay(); drawable = GLX.glXGetCurrentDrawable(); readDrawable = GLX.glXGetCurrentReadDrawable(); + if (drawable == 0) { + throw new GLException("Error: attempted to make an external GLDrawable without a drawable/context current"); + } // Need GLXFBConfig ID in order to properly create new contexts // on this drawable -- cgit v1.2.3