commit a9f41fa3aa451a5e7ac16bc87a199decb9d31d0a
Author: leszek <leszek@koltunski.pl>
Date:   Wed Mar 15 22:56:09 2017 +0000

    New 'glClearColor' and 'glClearDepthf' APIs in OutputSurface. This fixes the 'transparency' regressions from last commit.

diff --git a/src/main/java/org/distorted/library/DistortedOutputSurface.java b/src/main/java/org/distorted/library/DistortedOutputSurface.java
index c155731..1339285 100644
--- a/src/main/java/org/distorted/library/DistortedOutputSurface.java
+++ b/src/main/java/org/distorted/library/DistortedOutputSurface.java
@@ -40,6 +40,9 @@ abstract class DistortedOutputSurface extends DistortedSurface implements Distor
   int[] mDepthH = new int[1];
   int[] mFBOH   = new int[1];
 
+  private float mClearR, mClearG, mClearB, mClearA;
+  private float mClearDepth;
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   abstract DistortedFramebuffer getBuffer();
@@ -64,6 +67,13 @@ abstract class DistortedOutputSurface extends DistortedSurface implements Distor
 
     mTime = 0;
 
+    mClearR = 0.0f;
+    mClearG = 0.0f;
+    mClearB = 0.0f;
+    mClearA = 0.0f;
+
+    mClearDepth = 1.0f;
+
     createProjection();
     }
 
@@ -239,11 +249,42 @@ abstract class DistortedOutputSurface extends DistortedSurface implements Distor
       {
       mTime = time;
       DistortedRenderState.colorDepthOn();
-      GLES30.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
+      GLES30.glClearColor(mClearR, mClearG, mClearB, mClearA);
+      GLES30.glClearDepthf(mClearDepth);
       GLES30.glClear( GLES30.GL_DEPTH_BUFFER_BIT | GLES30.GL_COLOR_BUFFER_BIT);
       }
     }
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Set the (R,G,B,A) values of GLES30.glClearColor() to set up color with which to clear
+ * this Surface before each render.
+ *
+ * @param r the Red component. Default: 0.0f
+ * @param g the Green component. Default: 0.0f
+ * @param b the Blue component. Default: 0.0f
+ * @param a the Alpha component. Default: 0.0f
+ */
+  public void glClearColor(float r, float g, float b, float a)
+    {
+    mClearR = r;
+    mClearG = g;
+    mClearB = b;
+    mClearA = a;
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Set the Depth value of GLES30.glClearDepthf() to set up depth with which to clear
+ * the Depth buffer of Surface before each render.
+ *
+ * @param d the Depth. Default: 1.0f
+ */
+  public void glClearDepthf(float d)
+    {
+    mClearDepth = d;
+    }
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 /**
  * Create new Projection matrix.
