From e219ce85b450f760671f07fde72c8d119616bb8f Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 14 Mar 2023 15:04:33 +0100 Subject: GraphUI: MediaButton: No need to re-create GLRegion (anymore), just markShapeDirty() to force reupload of texture-coordinates; Also don't mute audio, user shall configure the GLMediaPlayer... --- src/graphui/classes/com/jogamp/graph/ui/gl/shapes/MediaButton.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/graphui/classes') diff --git a/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/MediaButton.java b/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/MediaButton.java index 6fe3af1d5..bdeee1e6b 100644 --- a/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/MediaButton.java +++ b/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/MediaButton.java @@ -128,11 +128,7 @@ public class MediaButton extends TexSeqButton { resetGL = false; try { mPlayer.initGL(gl); - mPlayer.setAudioVolume( 0f ); - region.destroy(gl); - region = null; - validate(gl, renderer); - markStateDirty(); // keep on going + region.markShapeDirty(); // reset texture data } catch (final Exception e) { e.printStackTrace(); } -- cgit v1.2.3