aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/com')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/impl/GLDrawableHelper.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/GLDrawableHelper.java b/src/jogl/classes/com/jogamp/opengl/impl/GLDrawableHelper.java
index 8cc12ca89..fcd662048 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/GLDrawableHelper.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/GLDrawableHelper.java
@@ -66,8 +66,15 @@ public class GLDrawableHelper {
}
public synchronized void addGLEventListener(GLEventListener listener) {
+ addGLEventListener(-1, listener);
+ }
+
+ public synchronized void addGLEventListener(int index, GLEventListener listener) {
+ if(0>index) {
+ index = listeners.size();
+ }
List newListeners = (List) ((ArrayList) listeners).clone();
- newListeners.add(listener);
+ newListeners.add(index, listener);
listeners = newListeners;
}