aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/javax/media/opengl
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/javax/media/opengl')
-rw-r--r--src/jogl/classes/javax/media/opengl/GLAutoDrawable.java32
-rw-r--r--src/jogl/classes/javax/media/opengl/awt/GLCanvas.java5
-rw-r--r--src/jogl/classes/javax/media/opengl/awt/GLJPanel.java5
3 files changed, 16 insertions, 26 deletions
diff --git a/src/jogl/classes/javax/media/opengl/GLAutoDrawable.java b/src/jogl/classes/javax/media/opengl/GLAutoDrawable.java
index fc569b13d..0f487f463 100644
--- a/src/jogl/classes/javax/media/opengl/GLAutoDrawable.java
+++ b/src/jogl/classes/javax/media/opengl/GLAutoDrawable.java
@@ -40,6 +40,8 @@
package javax.media.opengl;
+import java.util.List;
+
import jogamp.opengl.Debug;
/** A higher-level abstraction than {@link GLDrawable} which supplies
@@ -379,30 +381,16 @@ public interface GLAutoDrawable extends GLDrawable {
* @see #enqueue(GLRunnable)
*/
public boolean invoke(boolean wait, GLRunnable glRunnable);
-
+
/**
- * Enqueues a one-shot {@link GLRunnable},
- * which will be executed within the next {@link #display()} call
- * after all registered {@link GLEventListener}s
- * {@link GLEventListener#display(GLAutoDrawable) display(GLAutoDrawable)}
- * methods has been called.
- * <p>
- * Unlike the {@link #invoke(boolean, GLRunnable)}, this method only enqueues the {@link GLRunnable}
- * w/o taking care of it's execution. Hence either a performing {@link GLAnimatorControl animator}
- * or explicit user call shall trigger {@link #display()} to ensure it's execution.
- * </p>
- * <p>
- * Method return immediately w/o waiting or blocking
- * </p>
- *
- * @param glRunnable the {@link GLRunnable} to execute within the next {@link #display()} call
- *
- * @see #invoke(boolean, GLRunnable)
- * @see #display()
- * @see GLRunnable
+ * Extends {@link #invoke(boolean, GLRunnable)} functionality
+ * allowing to inject a list of {@link GLRunnable}s.
+ * @param wait if <code>true</code> block until execution of the last <code>glRunnable</code> is finished, otherwise return immediately w/o waiting
+ * @param glRunnables the {@link GLRunnable}s to execute within {@link #display()}
+ * @return <code>true</code> if the {@link GLRunnable}s has been processed or queued, otherwise <code>false</code>.
*/
- public void enqueue(GLRunnable glRunnable);
-
+ public boolean invoke(boolean wait, List<GLRunnable> glRunnables);
+
/** Destroys all resources associated with this GLAutoDrawable,
inclusive the GLContext.
If a window is attached to it's implementation, it shall be closed.
diff --git a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java
index 5b5f800a4..1d8666e6a 100644
--- a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java
+++ b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java
@@ -57,6 +57,7 @@ import java.awt.geom.Rectangle2D;
import java.awt.EventQueue;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
+import java.util.List;
import javax.media.nativewindow.AbstractGraphicsConfiguration;
import javax.media.nativewindow.OffscreenLayerOption;
@@ -746,8 +747,8 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
}
@Override
- public void enqueue(GLRunnable glRunnable) {
- helper.enqueue(glRunnable);
+ public boolean invoke(final boolean wait, final List<GLRunnable> glRunnables) {
+ return helper.invoke(this, wait, glRunnables);
}
@Override
diff --git a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
index 08d70211b..58b1baa65 100644
--- a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
+++ b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
@@ -54,6 +54,7 @@ import java.awt.image.DataBufferInt;
import java.beans.Beans;
import java.nio.ByteBuffer;
import java.nio.IntBuffer;
+import java.util.List;
import javax.media.nativewindow.AbstractGraphicsDevice;
import javax.media.nativewindow.NativeSurface;
@@ -483,8 +484,8 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
}
@Override
- public void enqueue(GLRunnable glRunnable) {
- helper.enqueue(glRunnable);
+ public boolean invoke(final boolean wait, final List<GLRunnable> glRunnables) {
+ return helper.invoke(this, wait, glRunnables);
}
@Override