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/X11ExternalGLContext.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/classes/com/sun/opengl/impl/x11/X11ExternalGLContext.java') diff --git a/src/classes/com/sun/opengl/impl/x11/X11ExternalGLContext.java b/src/classes/com/sun/opengl/impl/x11/X11ExternalGLContext.java index ae61c0063..e0446f4d6 100755 --- a/src/classes/com/sun/opengl/impl/x11/X11ExternalGLContext.java +++ b/src/classes/com/sun/opengl/impl/x11/X11ExternalGLContext.java @@ -51,6 +51,9 @@ public class X11ExternalGLContext extends X11GLContext { lockToolkit(); try { context = GLX.glXGetCurrentContext(); + if (context == 0) { + throw new GLException("Error: attempted to make an external GLContext without a drawable/context current"); + } drawable = new Drawable(GLX.glXGetCurrentDisplay()); } finally { unlockToolkit(); -- cgit v1.2.3