aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-03-13 06:47:05 +0100
committerSven Gothel <[email protected]>2023-03-13 06:47:05 +0100
commit357964eba18e73eb69e0ad68c85fca0a0e1ea192 (patch)
treed9bd3c925efbe79f622653a3d492a0c9612b2403 /src/jogl/classes/jogamp
parent6b39e7be037f13a72d7ba1ead24f01697823d779 (diff)
GLMediaPlayerImpl: isTextureAvailable() is always true after lastFrame init; Use private isPausedOrPlaying() to determine shaderCodeHash
Diffstat (limited to 'src/jogl/classes/jogamp')
-rw-r--r--src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java b/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java
index d29464552..a9e4b5bc3 100644
--- a/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java
+++ b/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java
@@ -293,7 +293,7 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
@Override
public final int getTextureFragmentShaderHashCode() {
- if( !isTextureAvailable() ) {
+ if( !isPausedOrPlaying() ) {
textureFragmentShaderHashCode = 0;
return 0;
} else if( 0 == textureFragmentShaderHashCode ) {
@@ -858,6 +858,10 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
@Override
public final boolean isTextureAvailable() {
+ 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;
}
@@ -1477,7 +1481,7 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
event_mask = addStateEventMask(event_mask, newState);
if( 0 != event_mask ) {
setState( newState );
- if( !isTextureAvailable() ) {
+ if( !isPausedOrPlaying() ) {
textureFragmentShaderHashCode = 0;
}
attributesUpdated( event_mask );