commit 27f42cd6e04884d44077e849ba84ec276846281e
Author: leszek <leszek@koltunski.pl>
Date:   Thu Apr 13 22:38:36 2017 +0100

    Actually implement proper postprocessing Buckets.

diff --git a/src/main/java/org/distorted/library/DistortedEffectsPostprocess.java b/src/main/java/org/distorted/library/DistortedEffectsPostprocess.java
index 6e44931..7b4751b 100644
--- a/src/main/java/org/distorted/library/DistortedEffectsPostprocess.java
+++ b/src/main/java/org/distorted/library/DistortedEffectsPostprocess.java
@@ -62,9 +62,16 @@ public class DistortedEffectsPostprocess
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  EffectQueuePostprocess getPostprocess()
+  int postprocess(long time, DistortedOutputSurface surface)
     {
-    return mP;
+    return mP.postprocess(time,surface);
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  long getBucket()
+    {
+    return mP.mNumEffects==0 ? 0: mID;
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/library/DistortedNode.java b/src/main/java/org/distorted/library/DistortedNode.java
index ce9d8c4..56e9315 100644
--- a/src/main/java/org/distorted/library/DistortedNode.java
+++ b/src/main/java/org/distorted/library/DistortedNode.java
@@ -212,13 +212,6 @@ public class DistortedNode implements DistortedAttacheable
     return 0;
     }
 
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  EffectQueuePostprocess getPostprocess()
-    {
-    return mPostprocess==null ? null : mPostprocess.getPostprocess();
-    }
-
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 // return the total number of render calls issued
 
@@ -535,6 +528,17 @@ public class DistortedNode implements DistortedAttacheable
     // TODO: rearrange all the siblings so that all are sorted by the DistortedEffectsPostprocess' ID.
     }
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Returns the DistortedEffectsPostprocess object that's in the Node.
+ *
+ * @return The DistortedEffectsPostprocess contained in the Node.
+ */
+  public DistortedEffectsPostprocess getEffectsPostprocess()
+    {
+    return mPostprocess;
+    }
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 /**
  * Returns the DistortedEffects object that's in the Node.
diff --git a/src/main/java/org/distorted/library/DistortedOutputSurface.java b/src/main/java/org/distorted/library/DistortedOutputSurface.java
index 6a53e1e..0114912 100644
--- a/src/main/java/org/distorted/library/DistortedOutputSurface.java
+++ b/src/main/java/org/distorted/library/DistortedOutputSurface.java
@@ -124,13 +124,13 @@ abstract class DistortedOutputSurface extends DistortedSurface implements Distor
     {
     int numRenders = 0;
     DistortedNode child;
-    EffectQueuePostprocess lastP=null, currP;
+    DistortedEffectsPostprocess lastP=null, currP;
     long lastB=0, currB;
 
     for(int i=0; i<num; i++)
       {
       child = children.get(i);
-      currP = child.getPostprocess();
+      currP = child.getEffectsPostprocess();
       currB = currP==null ? 0 : currP.getBucket();
 
       if( lastB!=currB && lastB!=0 )
diff --git a/src/main/java/org/distorted/library/EffectQueuePostprocess.java b/src/main/java/org/distorted/library/EffectQueuePostprocess.java
index 1470c8b..02e29e3 100644
--- a/src/main/java/org/distorted/library/EffectQueuePostprocess.java
+++ b/src/main/java/org/distorted/library/EffectQueuePostprocess.java
@@ -158,15 +158,6 @@ class EffectQueuePostprocess extends EffectQueue
     mDepthTexture2H = GLES30.glGetUniformLocation( blur2ProgramH, "u_DepthTexture");
     }
 
-///////////////////////////////////////////////////////////////////////////////////////////////////
-// TODO: change this into a EQP <--> long Map.
-// For now, just returning number of effects is sufficient.
-
-  long getBucket()
-    {
-    return mNumEffects;
-    }
-
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   synchronized boolean compute(long currTime)
