aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/jogamp')
-rw-r--r--src/jogl/classes/jogamp/opengl/GLAutoDrawableBase.java2
-rw-r--r--src/jogl/classes/jogamp/opengl/GLDrawableHelper.java9
2 files changed, 7 insertions, 4 deletions
diff --git a/src/jogl/classes/jogamp/opengl/GLAutoDrawableBase.java b/src/jogl/classes/jogamp/opengl/GLAutoDrawableBase.java
index 07029f143..d49fc75d9 100644
--- a/src/jogl/classes/jogamp/opengl/GLAutoDrawableBase.java
+++ b/src/jogl/classes/jogamp/opengl/GLAutoDrawableBase.java
@@ -265,7 +265,7 @@ public abstract class GLAutoDrawableBase implements GLAutoDrawable, FPSCounter {
@Override
public final void run() {
// Lock: Locked Surface/Window by MakeCurrent/Release
- helper.init(GLAutoDrawableBase.this);
+ helper.init(GLAutoDrawableBase.this, !sendReshape);
resetFPSCounter();
} };
diff --git a/src/jogl/classes/jogamp/opengl/GLDrawableHelper.java b/src/jogl/classes/jogamp/opengl/GLDrawableHelper.java
index 83b16884e..13c387231 100644
--- a/src/jogl/classes/jogamp/opengl/GLDrawableHelper.java
+++ b/src/jogl/classes/jogamp/opengl/GLDrawableHelper.java
@@ -330,8 +330,11 @@ public class GLDrawableHelper {
}
}
- /** The default init action to be called once after ctx is being created @ 1st makeCurrent(). */
- public final void init(GLAutoDrawable drawable) {
+ /**
+ * The default init action to be called once after ctx is being created @ 1st makeCurrent().
+ * @param sendReshape set to true if the subsequent display call won't reshape, otherwise false to avoid double reshape.
+ **/
+ public final void init(GLAutoDrawable drawable, boolean sendReshape) {
synchronized(listenersLock) {
final ArrayList<GLEventListener> _listeners = listeners;
for (int i=0; i < _listeners.size(); i++) {
@@ -341,7 +344,7 @@ public class GLDrawableHelper {
// This may happen not just for initial setup, but for ctx recreation due to resource change (drawable/window),
// hence it must be called unconditional, always.
listenersToBeInit.remove(listener); // remove if exist, avoiding dbl init
- init( listener, drawable, true /* sendReshape */);
+ init( listener, drawable, sendReshape);
}
}
}