commit 835cd7eb775a5aff382ae877add47716255a12a8
Author: Leszek Koltunski <leszek@koltunski.pl>
Date:   Fri Dec 16 21:49:53 2022 +0100

    simplify the crash app.

diff --git a/src/main/java/org/distorted/examples/flatblur2/FlatBlur2Renderer.java b/src/main/java/org/distorted/examples/flatblur2/FlatBlur2Renderer.java
index 866755a..aafd955 100644
--- a/src/main/java/org/distorted/examples/flatblur2/FlatBlur2Renderer.java
+++ b/src/main/java/org/distorted/examples/flatblur2/FlatBlur2Renderer.java
@@ -21,7 +21,6 @@ package org.distorted.examples.flatblur2;
 
 import android.opengl.GLSurfaceView;
 
-import org.distorted.library.effect.EffectQuality;
 import org.distorted.library.effect.PostprocessEffectGlow;
 import org.distorted.library.effect.VertexEffectScale;
 import org.distorted.library.main.DistortedEffects;
@@ -30,9 +29,6 @@ import org.distorted.library.main.DistortedNode;
 import org.distorted.library.main.DistortedScreen;
 import org.distorted.library.main.DistortedTexture;
 import org.distorted.library.mesh.MeshQuad;
-import org.distorted.library.message.EffectListener;
-import org.distorted.library.type.Dynamic2D;
-import org.distorted.library.type.Dynamic4D;
 import org.distorted.library.type.Static2D;
 import org.distorted.library.type.Static4D;
 
@@ -41,16 +37,11 @@ import javax.microedition.khronos.opengles.GL10;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-class FlatBlur2Renderer implements GLSurfaceView.Renderer, DistortedLibrary.ExceptionListener, EffectListener
+class FlatBlur2Renderer implements GLSurfaceView.Renderer, DistortedLibrary.ExceptionListener
 {
-    private static final int DUR_GLO =  2000;
-
-    private static final int[] colors = new int[] {0,0,1,  1,0,1,  1,0,0,  1,1,0,  0,1,0,  1,1,1}; // blue, pink, red, yellow, green, white
-    private static final int INDEX = 5;
-
     private final GLSurfaceView mView;
     private final DistortedScreen mScreen;
-    private DistortedNode mNode1, mNode2;
+    private final DistortedNode mNode;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
@@ -65,15 +56,15 @@ class FlatBlur2Renderer implements GLSurfaceView.Renderer, DistortedLibrary.Exce
       DistortedEffects effects1 = new DistortedEffects();
       VertexEffectScale mainScale= new VertexEffectScale(200);
       effects1.apply(mainScale);
-      mNode1 = new DistortedNode(texture1,effects1,mesh1);
-      mScreen.attach(mNode1);
+      mNode = new DistortedNode(texture1,effects1,mesh1);
+      mScreen.attach(mNode);
 
       DistortedTexture texture2 = new DistortedTexture();
       texture2.setColorARGB(0xffff0000);
       MeshQuad mesh2 = new MeshQuad();
       DistortedEffects effects2 = new DistortedEffects();
-      mNode2 = new DistortedNode(texture2,effects2,mesh2);
-      mScreen.attach(mNode2);
+      DistortedNode node2 = new DistortedNode(texture2,effects2,mesh2);
+      mScreen.attach(node2);
       }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -110,34 +101,10 @@ class FlatBlur2Renderer implements GLSurfaceView.Renderer, DistortedLibrary.Exce
 
     public void crash()
       {
-      Dynamic2D haloRadius = new Dynamic2D(DUR_GLO,1.0f);
-      haloRadius.add(new Static2D( 0, 0));
-      haloRadius.add(new Static2D(15,50));
-      haloRadius.add(new Static2D( 0, 0));
-
-      Dynamic4D color= new Dynamic4D(DUR_GLO,1.0f);
-      Static4D P1    = new Static4D(colors[3*INDEX],colors[3*INDEX+1], colors[3*INDEX+2], 0.0f);
-      Static4D P2    = new Static4D(colors[3*INDEX],colors[3*INDEX+1], colors[3*INDEX+2], 0.5f);
-      color.add(P1);
-      color.add(P2);
-      color.add(P1);
-
+      Static2D haloRadius = new Static2D(15,50);
+      Static4D color      = new Static4D(1,1,1,1);
       PostprocessEffectGlow glow = new PostprocessEffectGlow(haloRadius,color);
-      glow.setQuality(EffectQuality.MEDIUM);
-      glow.notifyWhenFinished(this);
-      DistortedEffects effects = mNode1.getEffects();
+      DistortedEffects effects = mNode.getEffects();
       effects.apply(glow);
       }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-   public void effectFinished(long id)
-      {
-      mScreen.detach(mNode1);
-      mNode1.markForDeletion();
-      mNode1=null;
-      mScreen.detach(mNode2);
-      mNode2.markForDeletion();
-      mNode2=null;
-      }
 }
