summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-09-11 16:40:42 +0200
committerSven Gothel <[email protected]>2013-09-11 16:40:42 +0200
commit5e3ee6c19a4291b309deb572d434f1c5df975024 (patch)
treed0812672cd2f6c82ffd7963cb1355fb88de87bbe /src
parent52820ff19070a8ae9f3966d8c8da42265f1481c2 (diff)
Fix TileRendererBase Bug: Avoid multiple GLEL init(..) call.
Diffstat (limited to 'src')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/TileRendererBase.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/TileRendererBase.java b/src/jogl/classes/com/jogamp/opengl/util/TileRendererBase.java
index 776f27c1f..133c3866f 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/TileRendererBase.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/TileRendererBase.java
@@ -378,8 +378,15 @@ public abstract class TileRendererBase {
final GLEventListener l = glad.getGLEventListener(0);
listenersInit[i] = glad.getGLEventListenerInitState(l);
listeners[i] = glad.removeGLEventListener( l );
+ final boolean trn;
if( listeners[i] instanceof TileRendererNotify ) {
+ trn = true;
((TileRendererNotify)listeners[i]).addTileRendererNotify(this);
+ } else {
+ trn = false;
+ }
+ if( DEBUG ) {
+ System.err.println("TileRenderer.attach["+i+"]: isInit "+listenersInit[i]+", isTRN "+trn+", "+listeners[i].getClass().getName());
}
}
glad.addGLEventListener(tiledGLEL);
@@ -461,8 +468,10 @@ public abstract class TileRendererBase {
final int aSz = listenersInit.length;
for(int i=0; i<aSz; i++) {
final GLEventListener l = listeners[i];
- l.init(drawable);
- listenersInit[i] = true;
+ if( !listenersInit[i] ) {
+ l.init(drawable);
+ listenersInit[i] = true;
+ }
}
if( null != glEventListenerPost ) {
glEventListenerPost.init(drawable);