commit 40f0cea67a439aaa93788ff5e9185069750992ed
Author: Leszek Koltunski <leszek@koltunski.pl>
Date:   Wed Dec 21 14:02:42 2022 +0100

    Debugging the Node piraminds - print the whole piramind along with all the Effects attached to each Node.

diff --git a/src/main/java/org/distorted/library/main/DistortedEffects.java b/src/main/java/org/distorted/library/main/DistortedEffects.java
index 9d2d490..d075fd9 100644
--- a/src/main/java/org/distorted/library/main/DistortedEffects.java
+++ b/src/main/java/org/distorted/library/main/DistortedEffects.java
@@ -221,14 +221,17 @@ public class DistortedEffects
 /**
  * Return a string describing all effects in the queues.
  */
-
-  public String debug()
+  public String debug(int depth)
     {
+    StringBuilder s = new StringBuilder();
+    for(int i=0; i<depth; i++) s.append(" ");
+    String space = s.toString();
+
     String mat = mQueues[0].retEffects();
     String ver = mQueues[1].retEffects();
     String fra = mQueues[2].retEffects();
     String pos = mQueues[3].retEffects();
 
-    return "MAT: "+mat+"\nVER: "+ver+"\nFRA: "+fra+"\nPOS: "+pos;
+    return space+"MAT: "+mat+"\n"+space+"VER: "+ver+"\n"+space+"FRA: "+fra+"\n"+space+"POS: "+pos;
     }
   }
diff --git a/src/main/java/org/distorted/library/main/DistortedNode.java b/src/main/java/org/distorted/library/main/DistortedNode.java
index a1faef5..1c7d84a 100644
--- a/src/main/java/org/distorted/library/main/DistortedNode.java
+++ b/src/main/java/org/distorted/library/main/DistortedNode.java
@@ -778,4 +778,22 @@ public class DistortedNode implements InternalChildrenList.Parent
     {
     mState.glClear(mask);
     }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Recursively print all the effect queues attached to the children Nodes and to this Node.
+ */
+  public void debug(int depth)
+    {
+    String dbg = mEffects.debug(depth);
+    android.util.Log.e("D", dbg);
+
+    int numChildren = mChildren.getNumChildren();
+
+    for(int i=0; i<numChildren; i++)
+      {
+      DistortedNode node = mChildren.getChild(i);
+      node.debug(depth+1);
+      }
+    }
   }
diff --git a/src/main/java/org/distorted/library/main/InternalOutputSurface.java b/src/main/java/org/distorted/library/main/InternalOutputSurface.java
index f145f4f..40daf04 100644
--- a/src/main/java/org/distorted/library/main/InternalOutputSurface.java
+++ b/src/main/java/org/distorted/library/main/InternalOutputSurface.java
@@ -616,6 +616,21 @@ public abstract class InternalOutputSurface extends InternalSurface implements I
     return numRenders;
     }
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Recursively print all the effect queues attached to the children Nodes and to this Node.
+ */
+  public void debug()
+    {
+    int numChildren = mChildren.getNumChildren();
+
+    for(int i=0; i<numChildren; i++)
+      {
+      DistortedNode node = mChildren.getChild(i);
+      node.debug(0);
+      }
+    }
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 /**
  * Bind this Surface as a Framebuffer we can render to.
