summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-08-10 08:43:08 +0200
committerSven Gothel <[email protected]>2013-08-10 08:43:08 +0200
commit8ef7760168c7051163c2a265c8662f1647a116c6 (patch)
tree88a990497a77333222588528411ec62fe8ed18cb
parent64b3c9d95736c77bf63b76c70c2c848c466d9942 (diff)
GLFBODrawableImpl.initialize(): Unrealize when already unrealized shall not throw an exception - only dump DEBUG info!
-rw-r--r--src/jogl/classes/jogamp/opengl/GLFBODrawableImpl.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/jogl/classes/jogamp/opengl/GLFBODrawableImpl.java b/src/jogl/classes/jogamp/opengl/GLFBODrawableImpl.java
index 3833e6852..d7979efdb 100644
--- a/src/jogl/classes/jogamp/opengl/GLFBODrawableImpl.java
+++ b/src/jogl/classes/jogamp/opengl/GLFBODrawableImpl.java
@@ -102,8 +102,15 @@ public class GLFBODrawableImpl extends GLDrawableImpl implements GLFBODrawable {
}
private final void initialize(boolean realize, GL gl) {
+ if( !initialized && !realize ) {
+ if( DEBUG ) {
+ System.err.println("GLFBODrawableImpl.initialize(): WARNING - Already unrealized!");
+ Thread.dumpStack();
+ }
+ return; // NOP, no exception for de-init twice or no init!
+ }
if( initialized == realize ) {
- throw new InternalError("Already set to initialize := "+realize+": "+this);
+ throw new IllegalStateException("initialize already in state "+realize+": "+this);
}
if(realize) {
final GLCapabilities chosenFBOCaps = (GLCapabilities) getChosenGLCapabilities(); // cloned at setRealized(true)