diff options
author | Sven Gothel <[email protected]> | 2023-03-14 14:22:01 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-03-14 14:22:01 +0100 |
commit | 3e17551fa1a61d1044d4e3d76c0f09293c4584d4 (patch) | |
tree | dfd60fe97819b663f3fb390ba35b5c168be6c7dc /src/jogl/classes | |
parent | e11d86828f3c5450d9f5443c6b0482b54b82cfdf (diff) |
GLMediaPlayerImpl: Zero textureFragmentShaderHashCode and default lookupFunction on Uninitialized state
Diffstat (limited to 'src/jogl/classes')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java b/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java index d94fbb1a7..42dc4e70b 100644 --- a/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java +++ b/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java @@ -307,7 +307,7 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer { @Override public final int getTextureFragmentShaderHashCode() { - if( !isPausedOrPlaying() ) { + if( State.Uninitialized == state ) { textureFragmentShaderHashCode = 0; return 0; } else if( 0 == textureFragmentShaderHashCode ) { @@ -876,10 +876,6 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer { return null != lastFrame; // Note: lastFrame is test-texture if using initGL() pre stream ready } - private final boolean isPausedOrPlaying() { - return State.Paused == state || State.Playing == state; - } - @Override public final TextureFrame getLastTexture() throws IllegalStateException { return lastFrame; @@ -1496,7 +1492,8 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer { event_mask = addStateEventMask(event_mask, newState); if( 0 != event_mask ) { setState( newState ); - if( !isPausedOrPlaying() ) { + if(State.Uninitialized == state) { + textureLookupFunctionName = "texture2D"; textureFragmentShaderHashCode = 0; } attributesUpdated( event_mask ); |