commit 3bb0d218d01fea33d21ae1c0c6f120e7ca7a5a02
Author: Leszek Koltunski <leszek@koltunski.pl>
Date:   Wed May 6 23:41:37 2020 +0100

    Convert Girl to stretchless API

diff --git a/src/main/java/org/distorted/examples/girl/GirlRenderer.java b/src/main/java/org/distorted/examples/girl/GirlRenderer.java
index 69f19ea..15c0518 100644
--- a/src/main/java/org/distorted/examples/girl/GirlRenderer.java
+++ b/src/main/java/org/distorted/examples/girl/GirlRenderer.java
@@ -27,8 +27,10 @@ import javax.microedition.khronos.opengles.GL10;
 
 import org.distorted.examples.R;
 
+import org.distorted.library.effect.EffectType;
 import org.distorted.library.effect.MatrixEffectScale;
 import org.distorted.library.effect.VertexEffectDistort;
+import org.distorted.library.effect.VertexEffectScale;
 import org.distorted.library.effect.VertexEffectSink;
 import org.distorted.library.effect.VertexEffectSwirl;
 import org.distorted.library.main.DistortedLibrary;
@@ -57,7 +59,7 @@ class GirlRenderer implements GLSurfaceView.Renderer
     private MeshRectangles mMesh;
     private Static3D v0,v1,v2,v3;
     private Static1D dBegin, dMiddle, dEnd, s0;
-    private Static3D mScale;
+    private Static3D mScaleMatrix, mScaleVertex;
     private float mBmpRatio;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -117,15 +119,17 @@ class GirlRenderer implements GLSurfaceView.Renderer
 
       mEffects = new DistortedEffects();
 
+      mScaleMatrix= new Static3D(1,1,1);
+      mScaleVertex= new Static3D(1,1,1);
+      mEffects.apply(new MatrixEffectScale(mScaleMatrix));
+      mEffects.apply(new VertexEffectScale(mScaleVertex));
+
       mEffects.apply( new VertexEffectSink   ( diSink, pLeft , sinkRegion) );
       mEffects.apply( new VertexEffectSink   ( diSink, pRight, sinkRegion) );
       mEffects.apply( new VertexEffectDistort( diL   , pLeft , Region    ) );
       mEffects.apply( new VertexEffectDistort( diR   , pRight, Region    ) );
       mEffects.apply( new VertexEffectSwirl  ( diHips, pHips , HipsRegion) );
 
-      mScale= new Static3D(1,1,1);
-      mEffects.apply(new MatrixEffectScale(mScale));
-
       mTexture = new DistortedTexture();
       mScreen = new DistortedScreen();
       }
@@ -167,7 +171,7 @@ class GirlRenderer implements GLSurfaceView.Renderer
    public void onSurfaceChanged(GL10 glUnused, int width, int height)
      {
      float factor = width<height ? width : height/mBmpRatio;
-     mScale.set( factor,factor,factor );
+     mScaleMatrix.set( factor,factor,factor );
      mScreen.resize(width, height);
      }
 
@@ -194,15 +198,16 @@ class GirlRenderer implements GLSurfaceView.Renderer
      mBmpRatio = (float)bitmap.getHeight()/bitmap.getWidth();
      mTexture.setTexture(bitmap);
 
-     if( mMesh==null )
-       {
-       mMesh = new MeshRectangles(30, (int)(30*mBmpRatio));
-       mMesh.setStretch(1.0f,mBmpRatio,1.0f);
-       }
+     mScaleVertex.set(1.0f,mBmpRatio,1.0f);
+
+     if( mMesh==null ) mMesh = new MeshRectangles(30, (int)(30*mBmpRatio));
 
      mScreen.detachAll();
      mScreen.attach(mTexture,mEffects,mMesh);
 
+     DistortedLibrary.setMax(EffectType.VERTEX ,6);
+
+     VertexEffectScale.enable();
      VertexEffectDistort.enable();
      VertexEffectSink.enable();
      VertexEffectSwirl.enable();
