summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)