commit eb50773479b5b15ef76fde81c33a853e7a0186b1
Author: Leszek Koltunski <leszek@koltunski.pl>
Date:   Wed Jun 3 21:25:20 2020 +0100

    Update Myanmar flag.

diff --git a/src/main/java/org/distorted/examples/deferredjob/DeferredJobRenderer.java b/src/main/java/org/distorted/examples/deferredjob/DeferredJobRenderer.java
index 6894083..13b9046 100644
--- a/src/main/java/org/distorted/examples/deferredjob/DeferredJobRenderer.java
+++ b/src/main/java/org/distorted/examples/deferredjob/DeferredJobRenderer.java
@@ -148,7 +148,7 @@ class DeferredJobRenderer implements GLSurfaceView.Renderer
 
     void apply(int number)
       {
-      mRotate.setMeshAssociation(number,0);
+      mRotate.setMeshAssociation(0,number);
       mAngle.set(360);
       mAngleDyn.resetToBeginning();
       }
@@ -184,10 +184,12 @@ class DeferredJobRenderer implements GLSurfaceView.Renderer
       MeshBase[] meshes = new MeshRectangles[MESHES];
 
       meshes[0] = new MeshRectangles(1,1);
+      meshes[0].setEffectAssociation(0,1,0);
 
       for(int i=1; i<MESHES; i++)
         {
         meshes[i] = meshes[0].copy(true);
+        meshes[i].setEffectAssociation(0,1,i);
         }
 
       Static4D[] lTextureMaps = new Static4D[MESHES];
@@ -207,7 +209,9 @@ class DeferredJobRenderer implements GLSurfaceView.Renderer
       VertexEffectMove   effect0 = new VertexEffectMove  ( new Static3D(0,0,0.5f) );
       VertexEffectRotate effect1 = new VertexEffectRotate( new Static1D(180), new Static3D(1,0,0), new Static3D(0,0,0) );
 
-      effect1.setMeshAssociation(1,0);  // apply only to mesh[1]
+      effect0.setMeshAssociation(1,0);  // apply only to Components whose andAssoc has the least significant bit set, i.e.
+                                        // to both meshes[0] and meshes[1]
+      effect1.setMeshAssociation(0,1);  // apply only to Components whose equAssoc is equal to 1, i.e. only to mesh[1]
 
       tmp[0].apply(effect0);
       tmp[0].apply(effect1);
@@ -218,13 +222,16 @@ class DeferredJobRenderer implements GLSurfaceView.Renderer
       tmp[0].mergeComponents();
       tmp[1].mergeComponents();
 
+      tmp[0].setEffectAssociation(0,0,0); // set the equAssoc of the 0th (the only) component to 0
+      tmp[1].setEffectAssociation(0,0,1); // set the equAssoc of the 0th (the only) component to 1
+
       MeshBase combined = new MeshJoined(tmp);
 
       VertexEffectMove moveL = new VertexEffectMove  ( new Static3D(-0.6f,0,0) );
       VertexEffectMove moveR = new VertexEffectMove  ( new Static3D(+0.6f,0,0) );
 
-      moveL.setMeshAssociation(0,0);
-      moveR.setMeshAssociation(1,0);
+      moveL.setMeshAssociation(0,0);  // apply only to tmp[0]
+      moveR.setMeshAssociation(0,1);  // apply only to tmp[1]
 
       combined.apply(moveL);
       combined.apply(moveR);
diff --git a/src/main/java/org/distorted/examples/meshjoin/MeshJoinRenderer.java b/src/main/java/org/distorted/examples/meshjoin/MeshJoinRenderer.java
index d9dc364..568275c 100644
--- a/src/main/java/org/distorted/examples/meshjoin/MeshJoinRenderer.java
+++ b/src/main/java/org/distorted/examples/meshjoin/MeshJoinRenderer.java
@@ -88,7 +88,7 @@ class MeshJoinRenderer implements GLSurfaceView.Renderer
 
       mSinkAssociation = 0;
       mSink = new VertexEffectSink( sink, center, new Static4D(0,0,0,0.75f) );
-      mSink.setMeshAssociation(-1,mSinkAssociation);
+      mSink.setMeshAssociation(mSinkAssociation,-1);
 
       mEffects = new DistortedEffects();
       mEffects.apply( new MatrixEffectQuaternion(quatInt2, center) );
@@ -151,7 +151,7 @@ class MeshJoinRenderer implements GLSurfaceView.Renderer
       if( checked ) mSinkAssociation |= n;
       else          mSinkAssociation &= (15-n);
 
-      mSink.setMeshAssociation(-1,mSinkAssociation);
+      mSink.setMeshAssociation(mSinkAssociation,-1);
       }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -209,14 +209,14 @@ class MeshJoinRenderer implements GLSurfaceView.Renderer
       final float angleFaces = (float)((180/Math.PI)*(2*Math.asin(SQ3/3))); // angle between two faces of a tetrahedron
       final int MESHES=4;
 
-      int association = 1;
+      int andAssoc = 1;
       MeshBase[] meshes = new MeshTriangles[MESHES];
 
       for(int i=0; i<MESHES; i++)
         {
         meshes[i] = new MeshTriangles(5);
-        meshes[i].setEffectAssociation(0,association);
-        association <<= 1;
+        meshes[i].setEffectAssociation(0,andAssoc,0);
+        andAssoc <<= 1;
         }
 
       Static4D[] textureMaps = new Static4D[MESHES];
@@ -267,10 +267,10 @@ class MeshJoinRenderer implements GLSurfaceView.Renderer
       VertexEffectDeform effect10= new VertexEffectDeform(dVec2, dRad, dCen2, dReg);
       VertexEffectDeform effect11= new VertexEffectDeform(dVec3, dRad, dCen3, dReg);
 
-      effect4.setMeshAssociation(-1,14);  // apply to mesh[1], [2] and [3]
-      effect5.setMeshAssociation(-1, 2);  // apply only to mesh[1]
-      effect6.setMeshAssociation(-1, 4);  // apply only to mesh[2]
-      effect7.setMeshAssociation(-1, 8);  // apply only to mesh[3]
+      effect4.setMeshAssociation(14,-1);  // apply to mesh[1], [2] and [3]
+      effect5.setMeshAssociation( 2,-1);  // apply only to mesh[1]
+      effect6.setMeshAssociation( 4,-1);  // apply only to mesh[2]
+      effect7.setMeshAssociation( 8,-1);  // apply only to mesh[3]
 
       result.apply(effect1);
       result.apply(effect2);
