diff options
Diffstat (limited to 'src/jogl/classes/com')
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/OffscreenAutoDrawable.java | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/OffscreenAutoDrawable.java b/src/jogl/classes/com/jogamp/opengl/OffscreenAutoDrawable.java index 8450ffdb0..4caea03b2 100644 --- a/src/jogl/classes/com/jogamp/opengl/OffscreenAutoDrawable.java +++ b/src/jogl/classes/com/jogamp/opengl/OffscreenAutoDrawable.java @@ -69,12 +69,26 @@ public class OffscreenAutoDrawable extends GLAutoDrawableDelegate { public boolean setSize(int newWidth, int newHeight) throws GLException { boolean done = false; if(drawable instanceof GLFBODrawableImpl) { + Throwable tFBO = null; + Throwable tGL = null; context.makeCurrent(); try { ((GLFBODrawableImpl)drawable).setSize(context.getGL(), newWidth, newHeight); done = true; + } catch (Throwable t) { + tFBO = t; } finally { - context.release(); + try { + context.release(); + } catch (Throwable t) { + tGL = t; + } + } + if(null != tFBO) { + throw new GLException("OffscreenAutoDrawable.setSize(..) GLFBODrawableImpl.setSize(..) exception", tFBO); + } + if(null != tGL) { + throw new GLException("OffscreenAutoDrawable.setSize(..) GLContext.release() exception", tGL); } } if(done) { |