From 5e3ee6c19a4291b309deb572d434f1c5df975024 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 11 Sep 2013 16:40:42 +0200 Subject: Fix TileRendererBase Bug: Avoid multiple GLEL init(..) call. --- .../classes/com/jogamp/opengl/util/TileRendererBase.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src') 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