aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-08-23 00:39:30 +0200
committerSven Gothel <[email protected]>2013-08-23 00:39:30 +0200
commit4dc4a32720e7b176e6811c0eaa8ddc060e1468da (patch)
treef52ea9bbd1c037f044d219e43c3f0fc4012b8171 /src/jogl/classes
parentc6555b09c455d0db238e4cf57ee3efd4e426f215 (diff)
TextureSequence: Add END_OF_STREAM_PTS, remove 'blocking' from getNextTexture(..), may blocks .. or not, depending on implementation and state.
Diffstat (limited to 'src/jogl/classes')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/texture/TextureSequence.java21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/TextureSequence.java b/src/jogl/classes/com/jogamp/opengl/util/texture/TextureSequence.java
index 05fda99ae..e13e5ff13 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/texture/TextureSequence.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/texture/TextureSequence.java
@@ -110,8 +110,11 @@ public interface TextureSequence {
* to associated related data.
*/
public static class TextureFrame {
- /** Constant marking an invalid PTS, i.e. Integer.MIN_VALUE 0x80000000 {@value}. */
- public static final int INVALID_PTS = 0x80000000 ; // == -2147483648 == Integer.MIN_VALUE;
+ /** Constant marking an invalid PTS, i.e. Integer.MIN_VALUE == 0x80000000 == {@value}. Sync w/ native code. */
+ public static final int INVALID_PTS = 0x80000000;
+
+ /** Constant marking the end of the stream PTS, i.e. Integer.MIN_VALUE - 1 == 0x7FFFFFFF == {@value}. Sync w/ native code. */
+ public static final int END_OF_STREAM_PTS = 0x7FFFFFFF;
public TextureFrame(Texture t) {
texture = t;
@@ -130,7 +133,7 @@ public interface TextureSequence {
public final void setDuration(int duration) { this.duration = duration; }
public String toString() {
- return "TextureFrame[pts " + pts + " ms, l " + duration + " ms, "+ texture + "]";
+ return "TextureFrame[pts " + pts + " ms, l " + duration + " ms, texID "+ texture.getTextureObject() + "]";
}
protected final Texture texture;
protected int pts;
@@ -141,7 +144,7 @@ public interface TextureSequence {
/**
* Signaling listeners that a new {@link TextureFrame} is available.
* <p>
- * User shall utilize {@link TextureSequence#getNextTexture(GL, boolean)} to dequeue it to maintain
+ * User shall utilize {@link TextureSequence#getNextTexture(GL)} to dequeue it to maintain
* a consistent queue.
* </p>
* @param ts the event source
@@ -163,7 +166,7 @@ public interface TextureSequence {
* <p>
* In case the instance is just initialized, it shall return a <code>TextureFrame</code>
* object with valid attributes. The texture content may be undefined
- * until the first call of {@link #getNextTexture(GL, boolean)}.<br>
+ * until the first call of {@link #getNextTexture(GL)}.<br>
* </p>
* Not blocking.
*
@@ -174,16 +177,16 @@ public interface TextureSequence {
/**
* Returns the next texture to be rendered.
* <p>
- * Implementation shall block until next frame is available if <code>blocking</code> is <code>true</code>,
- * otherwise it shall return the last frame in case a new frame is not available.
+ * Implementation shall return the next frame if available, may block if a next frame may arrive <i>soon</i>.
+ * Otherwise implementation shall return the last frame.
* </p>
* <p>
- * Shall return <code>null</code> in case <i>no</i> frame is available.
+ * Shall return <code>null</code> in case <i>no</i> next or last frame is available.
* </p>
*
* @throws IllegalStateException if instance is not initialized
*/
- public TextureFrame getNextTexture(GL gl, boolean blocking) throws IllegalStateException ;
+ public TextureFrame getNextTexture(GL gl) throws IllegalStateException ;
/**
* In case a shader extension is required, based on the implementation