commit 50642a86e15253c45bd88c3c976646b7d7297bfd
Author: Leszek Koltunski <leszek@distoretedandroid.org>
Date:   Fri Mar 3 15:50:54 2017 +0000

    Simplify drawRecursive

diff --git a/src/main/java/org/distorted/library/DistortedNode.java b/src/main/java/org/distorted/library/DistortedNode.java
index 0c7a3c3..6da8f0f 100644
--- a/src/main/java/org/distorted/library/DistortedNode.java
+++ b/src/main/java/org/distorted/library/DistortedNode.java
@@ -54,7 +54,7 @@ public class DistortedNode implements DistortedAttacheable
     {
     long ID;
     int numPointingNodes;
-    int numRender;
+    long currTime;
     ArrayList<Long> key;
     DistortedFramebuffer mFBO;
 
@@ -63,7 +63,7 @@ public class DistortedNode implements DistortedAttacheable
       ID              = id;
       key             = k;
       numPointingNodes= 1;
-      numRender       =-1;
+      currTime        =-1;
       mFBO            = null;
       }
     }
@@ -197,13 +197,13 @@ public class DistortedNode implements DistortedAttacheable
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 // return the total number of render calls issued
 
-  int drawRecursive(int renderNum, long currTime, DistortedOutputSurface surface)
+  int drawRecursive(long currTime, DistortedOutputSurface surface)
     {
     int ret = 0;
 
-    if( mNumChildren[0]>0 && mData.numRender!=renderNum )
+    if( mNumChildren[0]>0 && mData.currTime!=currTime )
       {
-      mData.numRender = renderNum;
+      mData.currTime = currTime;
       mData.mFBO.setAsOutput();
 
       GLES30.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
@@ -217,7 +217,7 @@ public class DistortedNode implements DistortedAttacheable
 
       for(int i=0; i<mNumChildren[0]; i++)
         {
-        ret += mChildren.get(i).drawRecursive(renderNum, currTime, mData.mFBO);
+        ret += mChildren.get(i).drawRecursive(currTime, mData.mFBO);
         }
       }
 
diff --git a/src/main/java/org/distorted/library/DistortedOutputSurface.java b/src/main/java/org/distorted/library/DistortedOutputSurface.java
index 4a81d63..fd3fea7 100644
--- a/src/main/java/org/distorted/library/DistortedOutputSurface.java
+++ b/src/main/java/org/distorted/library/DistortedOutputSurface.java
@@ -27,8 +27,6 @@ import java.util.ArrayList;
 
 abstract class DistortedOutputSurface extends DistortedSurface implements DistortedAttacheable
 {
-  private static int mRender = 0;
-
   private ArrayList<DistortedNode> mChildren;
   private int mNumChildren;   // ==mChildren.length(), but we only create mChildren if the first one gets added
 
@@ -115,8 +113,6 @@ abstract class DistortedOutputSurface extends DistortedSurface implements Distor
  */
   public int render(long time)
     {
-    mRender++;
-
     // change tree topology (attach and detach children)
 /*
     boolean changed =
@@ -154,7 +150,7 @@ abstract class DistortedOutputSurface extends DistortedSurface implements Distor
 
     for(int i=0; i<mNumChildren; i++)
       {
-      numRenders += mChildren.get(i).drawRecursive(mRender,time,this);
+      numRenders += mChildren.get(i).drawRecursive(time,this);
       }
 
     return numRenders;
diff --git a/src/main/res/raw/test_vertex_shader.glsl b/src/main/res/raw/test_vertex_shader.glsl
index 7cc4d88..0bceede 100644
--- a/src/main/res/raw/test_vertex_shader.glsl
+++ b/src/main/res/raw/test_vertex_shader.glsl
@@ -19,10 +19,9 @@
 
 precision lowp float;
 
-uniform vec2 u_objD;             // object width X object height.
-                                 // point (0,0) is the center of the object
-uniform mat4 u_MVPMatrix;        // the combined model/view/projection matrix.
-attribute vec2 a_Position;       // Per-vertex position information we will pass in.
+uniform vec2 u_objD;       // object width X object height.
+uniform mat4 u_MVPMatrix;  // the combined model/view/projection matrix.
+attribute vec2 a_Position; // Per-vertex position information we will pass in.
 
 //////////////////////////////////////////////////////////////////////////////////////////////
 
