diff options
author | Sven Gothel <[email protected]> | 2010-04-27 19:45:43 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2010-04-27 19:45:43 +0200 |
commit | 897c7248f9895d828542d524b211b74efcc715d2 (patch) | |
tree | 2b6ddc670320f5372b9d4a1a686d9e453e63ce82 /src/jogl/classes/com/jogamp/opengl/impl/x11/glx | |
parent | b5fc2499749d9c180d3e5a0e04a939bd78017068 (diff) |
JOGL Error Handling
- Catch invalid drawable for all impl. at GLContextImpl if !created yet
- GLDrawableFactoryImpl (X11/WGL) catch and fwd Throwable properly
- GLProfile catch LinkageError and handle it
In case of nothing is available, a final ExceptionInInitializer will be thrown,
with the produced GLException that no GLProfile is available.
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/impl/x11/glx')
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXContext.java | 3 | ||||
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawableFactory.java | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXContext.java b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXContext.java index 241c956dc..165f89dcc 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXContext.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXContext.java @@ -367,9 +367,6 @@ public abstract class X11GLXContext extends GLContextImpl { getDrawableImpl().getFactoryImpl().lockToolkit(); try { - if (drawable.getNativeWindow().getSurfaceHandle() == 0) { - throw new GLException("drawable not properly initialized: "+drawable); - } boolean created = false; if (context == 0) { create(); diff --git a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawableFactory.java b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawableFactory.java index b544404ad..aa1767c48 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawableFactory.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawableFactory.java @@ -89,11 +89,13 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl implements Dyna ctx.makeCurrent(); ctx.release(); sharedContext = ctx; + } catch (Throwable t) { + throw new GLException("X11GLXDrawableFactory - Could not initialize shared resources", t); } finally { X11Util.XUnlockDisplay(sharedScreen.getDevice().getHandle()); } if(null==sharedContext) { - throw new GLException("Couldn't init shared context"); + throw new GLException("X11GLXDrawableFactory - Shared Context is null"); } if (DEBUG) { System.err.println("!!! Vendor: "+vendorName+", ATI: "+isVendorATI+", NV: "+isVendorNVIDIA); |