aboutsummaryrefslogtreecommitdiffstats
path: root/src/classes/com/sun/opengl/impl/x11
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2006-02-11 01:11:57 +0000
committerKenneth Russel <[email protected]>2006-02-11 01:11:57 +0000
commit8ebdef6860e34bf16b9b13c657f651bf9ce32ab3 (patch)
treee1b51b0c8cacf3987f219b2e992af089aea5d1b4 /src/classes/com/sun/opengl/impl/x11
parentb75d4a3718b1a5744218e19c4f5c1a9ff0311f34 (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/x11')
-rwxr-xr-xsrc/classes/com/sun/opengl/impl/x11/X11ExternalGLContext.java3
-rwxr-xr-xsrc/classes/com/sun/opengl/impl/x11/X11ExternalGLDrawable.java3
2 files changed, 6 insertions, 0 deletions
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();
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