From 6faab9ada2a7e2b99bb20ce828915a07fdcbea27 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 14 Mar 2023 14:17:53 +0100 Subject: TextureSequence (API Change): Use setTextureLookupFunctionName(..) explicitly to set the name upfront, clarifying workflow. Impl: ImageSequence + GLMediaPlayerImpl --- .../com/jogamp/opengl/util/texture/ImageSequence.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/jogl/classes/com/jogamp/opengl/util/texture/ImageSequence.java') diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/ImageSequence.java b/src/jogl/classes/com/jogamp/opengl/util/texture/ImageSequence.java index e485e5452..2da2dcbfc 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/texture/ImageSequence.java +++ b/src/jogl/classes/com/jogamp/opengl/util/texture/ImageSequence.java @@ -153,16 +153,20 @@ public class ImageSequence implements TextureSequence { private String textureLookupFunctionName = "myTexture2D"; @Override - public String getTextureLookupFunctionName(final String desiredFuncName) throws IllegalStateException { + public String setTextureLookupFunctionName(final String texLookupFuncName) throws IllegalStateException { if(useBuildInTexLookup) { - return "texture2D"; - } - if(null != desiredFuncName && desiredFuncName.length()>0) { - textureLookupFunctionName = desiredFuncName; + textureLookupFunctionName = "texture2D"; + } else if(null != texLookupFuncName && texLookupFuncName.length()>0) { + textureLookupFunctionName = texLookupFuncName; } return textureLookupFunctionName; } + @Override + public String getTextureLookupFunctionName() throws IllegalStateException { + return textureLookupFunctionName; + } + @Override public String getTextureLookupFragmentShaderImpl() throws IllegalStateException { if(useBuildInTexLookup) { -- cgit v1.2.3