commit d9a683de1d3fd350add8462863cffa79f53b401d
Author: leszek <leszek@koltunski.pl>
Date:   Wed Dec 11 23:03:40 2024 +0100

    bugfix

diff --git a/src/main/java/org/distorted/examples/twocomponents/TwoComponentsRenderer.java b/src/main/java/org/distorted/examples/twocomponents/TwoComponentsRenderer.java
index ca38301..f54fc79 100644
--- a/src/main/java/org/distorted/examples/twocomponents/TwoComponentsRenderer.java
+++ b/src/main/java/org/distorted/examples/twocomponents/TwoComponentsRenderer.java
@@ -170,16 +170,14 @@ class TwoComponentsRenderer implements GLSurfaceView.Renderer, DistortedLibrary.
 
     void visible(boolean left)
       {
-      if( left )
-        {
-        mInvisibleLeft = !mInvisibleLeft;
-        mDisappear.setMeshAssociation(0, mInvisibleLeft ? 0 : -1 );
-        }
-      else
-        {
-        mInvisibleRight= !mInvisibleRight;
-        mDisappear.setMeshAssociation(0, mInvisibleRight ? 1 : -1 );
-        }
+      if( left ) mInvisibleLeft = !mInvisibleLeft;
+      else       mInvisibleRight= !mInvisibleRight;
+
+      int andAssoc = 0;
+      if( mInvisibleLeft ) andAssoc |= 0x1;
+      if( mInvisibleRight) andAssoc |= 0x2;
+
+      mDisappear.setMeshAssociation(andAssoc, -1 );
       }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -222,8 +220,8 @@ class TwoComponentsRenderer implements GLSurfaceView.Renderer, DistortedLibrary.
       tmp[0].mergeEffComponents();
       tmp[1].mergeEffComponents();
 
-      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
+      tmp[0].setEffectAssociation(0,1,0); // set the equAssoc of the 0th (the only) component to 0
+      tmp[1].setEffectAssociation(0,2,1); // set the equAssoc of the 0th (the only) component to 1
 
       MeshBase combined = new MeshJoined(tmp);
 
