From 253a91c252eed70edaee25cca3288cafa6de8071 Mon Sep 17 00:00:00 2001
From: Sven Gothel <sgothel@jausoft.com>
Date: Mon, 20 Mar 2023 06:16:16 +0100
Subject: GraphUI GLButton: Add missing destroyImpl(..) to destroy the
 ImageSequence and FBO-GLAD

---
 src/graphui/classes/com/jogamp/graph/ui/gl/shapes/GLButton.java | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'src/graphui')

diff --git a/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/GLButton.java b/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/GLButton.java
index 4ddb44606..8b81eb4f2 100644
--- a/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/GLButton.java
+++ b/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/GLButton.java
@@ -91,6 +91,12 @@ public class GLButton extends TexSeqButton {
 
     public final GLOffscreenAutoDrawable.FBO getFBOAutoDrawable() { return fboGLAD; }
 
+    @Override
+    protected void destroyImpl(final GL2ES2 gl, final RegionRenderer renderer) {
+        ((ImageSequence)texSeq).destroy(gl);
+        fboGLAD.destroy();
+    }
+
     @Override
     public void draw(final GL2ES2 gl, final RegionRenderer renderer, final int[] sampleCount) {
         final int[/*2*/] surfaceSize = getSurfaceSize(renderer.getMatrix(), renderer.getViewport(), new int[2]);
-- 
cgit v1.2.3