commit a935e9dbd8b47fccd837195c4f66dccb476dc378
Author: Leszek Koltunski <leszek@koltunski.pl>
Date:   Fri Jun 29 14:31:22 2018 +0100

    Correct a recently introduced bug.

diff --git a/src/main/java/org/distorted/examples/multiblur/MultiblurActivity.java b/src/main/java/org/distorted/examples/multiblur/MultiblurActivity.java
index a413809..faa4c7e 100644
--- a/src/main/java/org/distorted/examples/multiblur/MultiblurActivity.java
+++ b/src/main/java/org/distorted/examples/multiblur/MultiblurActivity.java
@@ -23,8 +23,11 @@ import android.app.Activity;
 import android.opengl.GLSurfaceView;
 import android.os.Bundle;
 import android.view.View;
+import android.widget.AdapterView;
+import android.widget.ArrayAdapter;
 import android.widget.CheckBox;
 import android.widget.SeekBar;
+import android.widget.Spinner;
 
 import org.distorted.examples.R;
 import org.distorted.library.main.Distorted;
@@ -32,7 +35,7 @@ import org.distorted.library.effect.EffectQuality;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-public class MultiblurActivity extends Activity implements SeekBar.OnSeekBarChangeListener
+public class MultiblurActivity extends Activity implements SeekBar.OnSeekBarChangeListener, AdapterView.OnItemSelectedListener
 {
     private int mQuality;
 
@@ -56,6 +59,56 @@ public class MultiblurActivity extends Activity implements SeekBar.OnSeekBarChan
         rangeBar.setProgress(50);
         mQuality = EffectQuality.HIGHEST.ordinal();
         }
+
+      Spinner typeSpinner  = (Spinner)findViewById(R.id.multiblur_spinnerQuality);
+      typeSpinner.setOnItemSelectedListener(this);
+
+      String[] objectType = new String[] {"Quality Highiest", "Quality High", "Quality Medium", "Quality Low"};
+
+      ArrayAdapter<String> adapterType = new ArrayAdapter<>(this, android.R.layout.simple_spinner_item, objectType);
+      adapterType.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
+      typeSpinner.setAdapter(adapterType);
+
+      Spinner bitmapSpinner  = (Spinner)findViewById(R.id.multiblur_spinnerMode);
+      bitmapSpinner.setOnItemSelectedListener(this);
+
+      String[] objectBitmap = new String[] { "Render: Normal", "Render: OIT" };
+
+      ArrayAdapter<String> adapterBitmap = new ArrayAdapter<>(this, android.R.layout.simple_spinner_item, objectBitmap);
+      adapterBitmap.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
+      bitmapSpinner.setAdapter(adapterBitmap);
+      }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+    public void onItemSelected(AdapterView<?> parent, View view, int pos, long id)
+      {
+      MultiblurSurfaceView v = this.findViewById(R.id.multiblurSurfaceView);
+      MultiblurRenderer renderer = v.getRenderer();
+
+      switch(parent.getId())
+        {
+        case R.id.multiblur_spinnerQuality: EffectQuality quality;
+
+                                            switch(pos)
+                                              {
+                                              case 0 : quality = EffectQuality.HIGHEST; break;
+                                              case 1 : quality = EffectQuality.HIGH   ; break;
+                                              case 2 : quality = EffectQuality.MEDIUM ; break;
+                                              default: quality = EffectQuality.LOW    ;
+                                              }
+                                            renderer.setQuality(quality);
+                                            mQuality = quality.ordinal();
+                                            break;
+        case R.id.multiblur_spinnerMode   : renderer.setRenderModeToOIT(pos==1);
+                                            break;
+        }
+      }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+    public void onNothingSelected(AdapterView<?> parent)
+      {
       }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -63,7 +116,7 @@ public class MultiblurActivity extends Activity implements SeekBar.OnSeekBarChan
     @Override
     protected void onPause() 
       {
-      GLSurfaceView view = (GLSurfaceView) this.findViewById(R.id.multiblurSurfaceView);
+      GLSurfaceView view = this.findViewById(R.id.multiblurSurfaceView);
       view.onPause();
       Distorted.onPause();
       super.onPause();
@@ -75,7 +128,7 @@ public class MultiblurActivity extends Activity implements SeekBar.OnSeekBarChan
     protected void onResume() 
       {
       super.onResume();
-      GLSurfaceView view = (GLSurfaceView) this.findViewById(R.id.multiblurSurfaceView);
+      GLSurfaceView view = this.findViewById(R.id.multiblurSurfaceView);
       view.onResume();
       }
     
@@ -95,7 +148,7 @@ public class MultiblurActivity extends Activity implements SeekBar.OnSeekBarChan
       {
       super.onSaveInstanceState(savedInstanceState);
 
-      MultiblurSurfaceView view = (MultiblurSurfaceView) this.findViewById(R.id.multiblurSurfaceView);
+      MultiblurSurfaceView view = this.findViewById(R.id.multiblurSurfaceView);
       MultiblurRenderer renderer = view.getRenderer();
 
       savedInstanceState.putBooleanArray("checkboxes", renderer.getChecked() );
@@ -111,7 +164,7 @@ public class MultiblurActivity extends Activity implements SeekBar.OnSeekBarChan
 
       boolean[] checkboxes = savedInstanceState.getBooleanArray("checkboxes");
 
-      MultiblurSurfaceView view = (MultiblurSurfaceView) this.findViewById(R.id.multiblurSurfaceView);
+      MultiblurSurfaceView view = this.findViewById(R.id.multiblurSurfaceView);
       MultiblurRenderer renderer = view.getRenderer();
 
       if( checkboxes!=null )
@@ -126,10 +179,10 @@ public class MultiblurActivity extends Activity implements SeekBar.OnSeekBarChan
 
       switch(mQuality)
         {
-        case 0 : quality0(null); break;
-        case 1 : quality1(null); break;
-        case 2 : quality2(null); break;
-        case 3 : quality3(null); break;
+        case 0 : renderer.setQuality(EffectQuality.HIGHEST); break;
+        case 1 : renderer.setQuality(EffectQuality.HIGH   ); break;
+        case 2 : renderer.setQuality(EffectQuality.MEDIUM ); break;
+        case 3 : renderer.setQuality(EffectQuality.LOW    ); break;
         default: android.util.Log.e("MultiBlur", "error - unknown quality!");
         }
       }
@@ -140,10 +193,10 @@ public class MultiblurActivity extends Activity implements SeekBar.OnSeekBarChan
       {
       switch (bar.getId())
         {
-        case R.id.multiblurDistanceSeek: MultiblurSurfaceView view1 = (MultiblurSurfaceView) this.findViewById(R.id.multiblurSurfaceView);
+        case R.id.multiblurDistanceSeek: MultiblurSurfaceView view1 = this.findViewById(R.id.multiblurSurfaceView);
                                          view1.getRenderer().setDistance(progress);
                                          break;
-        case R.id.multiblurRangeSeek   : MultiblurSurfaceView view2 = (MultiblurSurfaceView) this.findViewById(R.id.multiblurSurfaceView);
+        case R.id.multiblurRangeSeek   : MultiblurSurfaceView view2 = this.findViewById(R.id.multiblurSurfaceView);
                                          view2.getRenderer().setRange(progress);
                                          break;
 
@@ -165,7 +218,7 @@ public class MultiblurActivity extends Activity implements SeekBar.OnSeekBarChan
     CheckBox box = (CheckBox)view;
     int id = box.getId();
     boolean checked = box.isChecked();
-    MultiblurSurfaceView sView = (MultiblurSurfaceView) this.findViewById(R.id.multiblurSurfaceView);
+    MultiblurSurfaceView sView = this.findViewById(R.id.multiblurSurfaceView);
 
     switch(id)
       {
@@ -180,43 +233,4 @@ public class MultiblurActivity extends Activity implements SeekBar.OnSeekBarChan
       }
     }
 
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public void quality0(View v)
-    {
-    MultiblurSurfaceView view = (MultiblurSurfaceView) this.findViewById(R.id.multiblurSurfaceView);
-    MultiblurRenderer renderer = view.getRenderer();
-    renderer.setQuality(EffectQuality.HIGHEST);
-    mQuality = EffectQuality.HIGHEST.ordinal();
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public void quality1(View v)
-    {
-    MultiblurSurfaceView view = (MultiblurSurfaceView) this.findViewById(R.id.multiblurSurfaceView);
-    MultiblurRenderer renderer = view.getRenderer();
-    renderer.setQuality(EffectQuality.HIGH);
-    mQuality = EffectQuality.HIGH.ordinal();
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public void quality2(View v)
-    {
-    MultiblurSurfaceView view = (MultiblurSurfaceView) this.findViewById(R.id.multiblurSurfaceView);
-    MultiblurRenderer renderer = view.getRenderer();
-    renderer.setQuality(EffectQuality.MEDIUM);
-    mQuality = EffectQuality.MEDIUM.ordinal();
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public void quality3(View v)
-    {
-    MultiblurSurfaceView view = (MultiblurSurfaceView) this.findViewById(R.id.multiblurSurfaceView);
-    MultiblurRenderer renderer = view.getRenderer();
-    renderer.setQuality(EffectQuality.LOW);
-    mQuality = EffectQuality.LOW.ordinal();
-    }
 }
diff --git a/src/main/java/org/distorted/examples/multiblur/MultiblurRenderer.java b/src/main/java/org/distorted/examples/multiblur/MultiblurRenderer.java
index e6ff9e9..da69ced 100644
--- a/src/main/java/org/distorted/examples/multiblur/MultiblurRenderer.java
+++ b/src/main/java/org/distorted/examples/multiblur/MultiblurRenderer.java
@@ -147,6 +147,13 @@ class MultiblurRenderer implements GLSurfaceView.Renderer
       mBlur.setQuality(quality);
       }
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+    void setRenderModeToOIT(boolean oit)
+      {
+      mScreen.setOrderIndependentTransparency(oit);
+      }
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
     public void onDrawFrame(GL10 glUnused) 
diff --git a/src/main/java/org/distorted/examples/transparency/TransparencyActivity.java b/src/main/java/org/distorted/examples/transparency/TransparencyActivity.java
index d8cedf4..bfa4f71 100644
--- a/src/main/java/org/distorted/examples/transparency/TransparencyActivity.java
+++ b/src/main/java/org/distorted/examples/transparency/TransparencyActivity.java
@@ -23,14 +23,17 @@ import android.app.Activity;
 import android.opengl.GLSurfaceView;
 import android.os.Bundle;
 import android.view.View;
+import android.widget.AdapterView;
+import android.widget.ArrayAdapter;
 import android.widget.SeekBar;
+import android.widget.Spinner;
 
 import org.distorted.examples.R;
 import org.distorted.library.main.Distorted;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-public class TransparencyActivity extends Activity implements SeekBar.OnSeekBarChangeListener
+public class TransparencyActivity extends Activity implements SeekBar.OnSeekBarChangeListener, AdapterView.OnItemSelectedListener
 {
     private int mRenderFirst;
 
@@ -54,8 +57,45 @@ public class TransparencyActivity extends Activity implements SeekBar.OnSeekBarC
         barYellow.setProgress(50);
         privateRenderFirst(0);
         }
+
+      Spinner typeSpinner  = (Spinner)findViewById(R.id.transparency_spinnerFirst);
+      typeSpinner.setOnItemSelectedListener(this);
+
+      String[] objectType = new String[] {"First: Red", "First: Yellow"};
+
+      ArrayAdapter<String> adapterType = new ArrayAdapter<>(this, android.R.layout.simple_spinner_item, objectType);
+      adapterType.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
+      typeSpinner.setAdapter(adapterType);
+
+      Spinner bitmapSpinner  = (Spinner)findViewById(R.id.transparency_spinnerMode);
+      bitmapSpinner.setOnItemSelectedListener(this);
+
+      String[] objectBitmap = new String[] { "Render: Normal", "Render: OIT" };
+
+      ArrayAdapter<String> adapterBitmap = new ArrayAdapter<>(this, android.R.layout.simple_spinner_item, objectBitmap);
+      adapterBitmap.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
+      bitmapSpinner.setAdapter(adapterBitmap);
       }
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  public void onItemSelected(AdapterView<?> parent, View view, int pos, long id)
+    {
+    switch(parent.getId())
+      {
+      case R.id.transparency_spinnerFirst  : privateRenderFirst(pos);
+                                             break;
+      case R.id.transparency_spinnerMode   : setRenderModeToOIT(pos==1);
+                                             break;
+      }
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  public void onNothingSelected(AdapterView<?> parent)
+    {
+    }
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////
     
     @Override
@@ -131,13 +171,12 @@ public class TransparencyActivity extends Activity implements SeekBar.OnSeekBarC
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-    public void renderFirst(View v)
+    private void setRenderModeToOIT(boolean oit)
       {
-      switch(v.getId())
-        {
-        case R.id.transparencyRed   : privateRenderFirst(0); break;
-        case R.id.transparencyYellow: privateRenderFirst(1); break;
-        }
+      TransparencySurfaceView view = (TransparencySurfaceView) this.findViewById(R.id.transparencySurfaceView);
+      TransparencyRenderer renderer= view.getRenderer();
+
+      renderer.setRenderModeToOIT(oit);
       }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/examples/transparency/TransparencyRenderer.java b/src/main/java/org/distorted/examples/transparency/TransparencyRenderer.java
index 00e8c3c..eb65e0a 100644
--- a/src/main/java/org/distorted/examples/transparency/TransparencyRenderer.java
+++ b/src/main/java/org/distorted/examples/transparency/TransparencyRenderer.java
@@ -149,6 +149,13 @@ class TransparencyRenderer implements GLSurfaceView.Renderer
         }
       }
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+    void setRenderModeToOIT(boolean oit)
+      {
+      mScreen.setOrderIndependentTransparency(oit);
+      }
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
     public void onDrawFrame(GL10 glUnused) 
diff --git a/src/main/java/org/distorted/examples/triblur/TriblurActivity.java b/src/main/java/org/distorted/examples/triblur/TriblurActivity.java
index 018ffa9..c32a7e7 100644
--- a/src/main/java/org/distorted/examples/triblur/TriblurActivity.java
+++ b/src/main/java/org/distorted/examples/triblur/TriblurActivity.java
@@ -23,8 +23,11 @@ import android.app.Activity;
 import android.opengl.GLSurfaceView;
 import android.os.Bundle;
 import android.view.View;
+import android.widget.AdapterView;
+import android.widget.ArrayAdapter;
 import android.widget.CheckBox;
 import android.widget.SeekBar;
+import android.widget.Spinner;
 
 import org.distorted.examples.R;
 import org.distorted.library.effect.EffectQuality;
@@ -32,7 +35,7 @@ import org.distorted.library.main.Distorted;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-public class TriblurActivity extends Activity implements SeekBar.OnSeekBarChangeListener
+public class TriblurActivity extends Activity implements SeekBar.OnSeekBarChangeListener, AdapterView.OnItemSelectedListener
 {
     private int mQuality;
     private int mBackground;
@@ -45,9 +48,9 @@ public class TriblurActivity extends Activity implements SeekBar.OnSeekBarChange
       super.onCreate(savedState);
       setContentView(R.layout.triblurlayout);
 
-      SeekBar radiusBar0 = (SeekBar)findViewById(R.id.triblurSeek0);
-      SeekBar radiusBar1 = (SeekBar)findViewById(R.id.triblurSeek1);
-      SeekBar radiusBar2 = (SeekBar)findViewById(R.id.triblurSeek2);
+      SeekBar radiusBar0 = findViewById(R.id.triblurSeek0);
+      SeekBar radiusBar1 = findViewById(R.id.triblurSeek1);
+      SeekBar radiusBar2 = findViewById(R.id.triblurSeek2);
 
       radiusBar0.setOnSeekBarChangeListener(this);
       radiusBar1.setOnSeekBarChangeListener(this);
@@ -62,6 +65,45 @@ public class TriblurActivity extends Activity implements SeekBar.OnSeekBarChange
         privateQuality(1);
         privateBackgroundColor(1);
         }
+
+      Spinner typeSpinner  = findViewById(R.id.triblur_spinnerQuality);
+      typeSpinner.setOnItemSelectedListener(this);
+
+      String[] objectType = new String[] {"Quality Highiest", "Quality High", "Quality Medium", "Quality Low"};
+
+      ArrayAdapter<String> adapterType = new ArrayAdapter<>(this, android.R.layout.simple_spinner_item, objectType);
+      adapterType.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
+      typeSpinner.setAdapter(adapterType);
+
+      Spinner bitmapSpinner  = findViewById(R.id.triblur_spinnerMode);
+      bitmapSpinner.setOnItemSelectedListener(this);
+
+      String[] objectBitmap = new String[] { "Render: Normal", "Render: OIT" };
+
+      ArrayAdapter<String> adapterBitmap = new ArrayAdapter<>(this, android.R.layout.simple_spinner_item, objectBitmap);
+      adapterBitmap.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
+      bitmapSpinner.setAdapter(adapterBitmap);
+      }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+    public void onItemSelected(AdapterView<?> parent, View view, int pos, long id)
+      {
+      switch(parent.getId())
+        {
+        case R.id.triblur_spinnerQuality: privateQuality(pos);
+                                          break;
+        case R.id.triblur_spinnerMode   : TriblurSurfaceView v = this.findViewById(R.id.triblurSurfaceView);
+                                          TriblurRenderer renderer = v.getRenderer();
+                                          renderer.setRenderModeToOIT(pos==1);
+                                          break;
+        }
+      }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+    public void onNothingSelected(AdapterView<?> parent)
+      {
       }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -69,7 +111,7 @@ public class TriblurActivity extends Activity implements SeekBar.OnSeekBarChange
     @Override
     protected void onPause() 
       {
-      GLSurfaceView view = (GLSurfaceView) this.findViewById(R.id.triblurSurfaceView);
+      GLSurfaceView view = this.findViewById(R.id.triblurSurfaceView);
       view.onPause();
       Distorted.onPause();
       super.onPause();
@@ -81,7 +123,7 @@ public class TriblurActivity extends Activity implements SeekBar.OnSeekBarChange
     protected void onResume() 
       {
       super.onResume();
-      GLSurfaceView view = (GLSurfaceView) this.findViewById(R.id.triblurSurfaceView);
+      GLSurfaceView view = this.findViewById(R.id.triblurSurfaceView);
       view.onResume();
       }
     
@@ -101,7 +143,7 @@ public class TriblurActivity extends Activity implements SeekBar.OnSeekBarChange
       {
       super.onSaveInstanceState(savedInstanceState);
 
-      TriblurSurfaceView view = (TriblurSurfaceView) this.findViewById(R.id.triblurSurfaceView);
+      TriblurSurfaceView view = this.findViewById(R.id.triblurSurfaceView);
       TriblurRenderer renderer = view.getRenderer();
 
       savedInstanceState.putBooleanArray("checkboxes", renderer.getChecked() );
@@ -118,7 +160,7 @@ public class TriblurActivity extends Activity implements SeekBar.OnSeekBarChange
 
       boolean[] checkboxes = savedInstanceState.getBooleanArray("checkboxes");
 
-      TriblurSurfaceView view = (TriblurSurfaceView) this.findViewById(R.id.triblurSurfaceView);
+      TriblurSurfaceView view = this.findViewById(R.id.triblurSurfaceView);
       TriblurRenderer renderer = view.getRenderer();
 
       if( checkboxes!=null )
@@ -142,13 +184,13 @@ public class TriblurActivity extends Activity implements SeekBar.OnSeekBarChange
       {
       switch (bar.getId())
         {
-        case R.id.triblurSeek0: TriblurSurfaceView view0 = (TriblurSurfaceView) this.findViewById(R.id.triblurSurfaceView);
+        case R.id.triblurSeek0: TriblurSurfaceView view0 = this.findViewById(R.id.triblurSurfaceView);
                                 view0.getRenderer().setRange(0,progress);
                                 break;
-        case R.id.triblurSeek1: TriblurSurfaceView view1 = (TriblurSurfaceView) this.findViewById(R.id.triblurSurfaceView);
+        case R.id.triblurSeek1: TriblurSurfaceView view1 = this.findViewById(R.id.triblurSurfaceView);
                                 view1.getRenderer().setRange(1,progress);
                                 break;
-        case R.id.triblurSeek2: TriblurSurfaceView view2 = (TriblurSurfaceView) this.findViewById(R.id.triblurSurfaceView);
+        case R.id.triblurSeek2: TriblurSurfaceView view2 = this.findViewById(R.id.triblurSurfaceView);
                                 view2.getRenderer().setRange(2,progress);
                                 break;
         }
@@ -168,7 +210,7 @@ public class TriblurActivity extends Activity implements SeekBar.OnSeekBarChange
     {
     CheckBox box = (CheckBox)view;
     boolean checked = box.isChecked();
-    TriblurSurfaceView sView = (TriblurSurfaceView) this.findViewById(R.id.triblurSurfaceView);
+    TriblurSurfaceView sView = this.findViewById(R.id.triblurSurfaceView);
 
     switch(box.getId())
       {
@@ -190,24 +232,11 @@ public class TriblurActivity extends Activity implements SeekBar.OnSeekBarChange
       }
     }
 
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public void quality(View v)
-    {
-    switch(v.getId())
-      {
-      case R.id.triblurRadioQuality0: privateQuality(0); break;
-      case R.id.triblurRadioQuality1: privateQuality(1); break;
-      case R.id.triblurRadioQuality2: privateQuality(2); break;
-      case R.id.triblurRadioQuality3: privateQuality(3); break;
-      }
-    }
-
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   private void privateBackgroundColor(int index)
     {
-    TriblurSurfaceView view = (TriblurSurfaceView) this.findViewById(R.id.triblurSurfaceView);
+    TriblurSurfaceView view = this.findViewById(R.id.triblurSurfaceView);
     TriblurRenderer renderer = view.getRenderer();
 
     switch(index)
@@ -222,7 +251,7 @@ public class TriblurActivity extends Activity implements SeekBar.OnSeekBarChange
 
   private void privateQuality(int index)
     {
-    TriblurSurfaceView view = (TriblurSurfaceView) this.findViewById(R.id.triblurSurfaceView);
+    TriblurSurfaceView view = this.findViewById(R.id.triblurSurfaceView);
     TriblurRenderer renderer = view.getRenderer();
 
     switch(index)
diff --git a/src/main/java/org/distorted/examples/triblur/TriblurRenderer.java b/src/main/java/org/distorted/examples/triblur/TriblurRenderer.java
index 4407d8f..2831b47 100644
--- a/src/main/java/org/distorted/examples/triblur/TriblurRenderer.java
+++ b/src/main/java/org/distorted/examples/triblur/TriblurRenderer.java
@@ -149,6 +149,13 @@ class TriblurRenderer implements GLSurfaceView.Renderer
         }
       }
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+    void setRenderModeToOIT(boolean oit)
+      {
+      mScreen.setOrderIndependentTransparency(oit);
+      }
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
     void setBackground(float r, float g, float b, float a)
diff --git a/src/main/res/layout/multiblurlayout.xml b/src/main/res/layout/multiblurlayout.xml
index 46571e6..a7091b8 100644
--- a/src/main/res/layout/multiblurlayout.xml
+++ b/src/main/res/layout/multiblurlayout.xml
@@ -10,6 +10,29 @@
         android:layout_height="0dp"
         android:layout_weight="1" />
 
+    <LinearLayout
+        android:id="@+id/linearLayout3"
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:gravity="center|fill_horizontal"
+        android:orientation="horizontal"
+        android:background="@color/blue">
+
+        <Spinner
+            android:layout_width="0dp"
+            android:layout_height="50dp"
+            android:layout_weight="0.5"
+            android:id="@+id/multiblur_spinnerQuality"
+            />
+
+        <Spinner
+            android:layout_width="0dp"
+            android:layout_height="50dp"
+            android:layout_weight="0.5"
+            android:id="@+id/multiblur_spinnerMode"
+            />
+    </LinearLayout>
+
     <LinearLayout
         android:id="@+id/linearLayout1"
         android:layout_width="fill_parent"
@@ -115,61 +138,4 @@
 
     </LinearLayout>
 
-    <LinearLayout
-        android:id="@+id/linearLayout3"
-        android:layout_width="fill_parent"
-        android:layout_height="wrap_content"
-        android:gravity="center|fill_horizontal"
-        android:orientation="horizontal"
-        android:background="@color/blue"
-        android:paddingBottom="10dp"
-        android:paddingTop="10dp" >
-
-        <RadioGroup
-            android:id="@+id/multiblurRadioGroup"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:orientation="horizontal">
-
-            <RadioButton
-                android:id="@+id/multiblurRadioQuality0"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_weight="1"
-                android:checked="true"
-                android:onClick="quality0"
-                android:text="@string/quality0"
-                android:textSize="14sp"/>
-
-            <RadioButton
-                android:id="@+id/multiblurRadioQuality1"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_weight="1"
-                android:onClick="quality1"
-                android:text="@string/quality1"
-                android:textSize="14sp"/>
-
-            <RadioButton
-                android:id="@+id/multiblurRadioQuality2"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_weight="1"
-                android:onClick="quality2"
-                android:text="@string/quality2"
-                android:textSize="14sp"/>
-
-            <RadioButton
-                android:id="@+id/multiblurRadioQuality3"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_weight="1"
-                android:onClick="quality3"
-                android:text="@string/quality3"
-                android:textSize="14sp"/>
-
-        </RadioGroup>
-
-    </LinearLayout>
-
 </LinearLayout>
\ No newline at end of file
diff --git a/src/main/res/layout/transparencylayout.xml b/src/main/res/layout/transparencylayout.xml
index ae0a0b0..9431253 100644
--- a/src/main/res/layout/transparencylayout.xml
+++ b/src/main/res/layout/transparencylayout.xml
@@ -11,67 +11,38 @@
         android:layout_weight="1" />
 
     <LinearLayout
-        android:id="@+id/linearLayout1"
-        android:layout_width="fill_parent"
-        android:layout_height="100dp"
-        android:orientation="horizontal">
-
-        <LinearLayout
-            android:id="@+id/linearLayout2"
-            android:layout_width="wrap_content"
-            android:layout_height="fill_parent"
-            android:orientation="vertical"
-            android:layout_weight="0.1">
-
-            <RadioGroup
-                android:id="@+id/transparencyRadioGroup"
-                android:layout_width="fill_parent"
-                android:layout_height="fill_parent"
-                android:orientation="vertical">
-
-                <RadioButton
-                    android:id="@+id/transparencyRed"
-                    android:layout_width="fill_parent"
-                    android:layout_height="wrap_content"
-                    android:layout_weight="1"
-                    android:background="@color/red"
-                    android:onClick="renderFirst"
-                    android:checked="true"
-                    android:textSize="14sp"/>
-
-                <RadioButton
-                    android:id="@+id/transparencyYellow"
-                    android:layout_width="fill_parent"
-                    android:layout_height="wrap_content"
-                    android:layout_weight="1"
-                    android:background="@color/yellow"
-                    android:onClick="renderFirst"
-                    android:textSize="14sp"/>
-            </RadioGroup>
-        </LinearLayout>
-
-        <LinearLayout
-            android:id="@+id/linearLayout3"
-            android:layout_width="wrap_content"
-            android:layout_height="fill_parent"
-            android:orientation="vertical"
-            android:layout_weight="0.9">
+        android:orientation="horizontal"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content">
+
+        <Spinner
+            android:layout_width="0dp"
+            android:layout_height="50dp"
+            android:layout_weight="0.5"
+            android:id="@+id/transparency_spinnerFirst"
+            />
+
+        <Spinner
+            android:layout_width="0dp"
+            android:layout_height="50dp"
+            android:layout_weight="0.5"
+            android:id="@+id/transparency_spinnerMode"
+            />
+    </LinearLayout>
 
-            <SeekBar
-                android:id="@+id/transparencySeekRed"
-                android:background="@color/red"
-                android:layout_height="50dp"
-                android:layout_width="fill_parent"
-                android:paddingLeft="10dp"
-                android:paddingRight="10dp" />
-            <SeekBar
-                android:id="@+id/transparencySeekYellow"
-                android:background="@color/yellow"
-                android:layout_height="50dp"
-                android:layout_width="fill_parent"
-                android:paddingLeft="10dp"
-                android:paddingRight="10dp" />
+    <SeekBar
+        android:id="@+id/transparencySeekRed"
+        android:background="@color/red"
+        android:layout_height="50dp"
+        android:layout_width="fill_parent"
+        android:paddingLeft="10dp"
+        android:paddingRight="10dp" />
+    <SeekBar
+        android:id="@+id/transparencySeekYellow"
+        android:background="@color/yellow"
+        android:layout_height="50dp"
+        android:layout_width="fill_parent"
+        android:paddingLeft="10dp"
+        android:paddingRight="10dp" />
 
-        </LinearLayout>
-    </LinearLayout>
 </LinearLayout>
\ No newline at end of file
diff --git a/src/main/res/layout/triblurlayout.xml b/src/main/res/layout/triblurlayout.xml
index 07c6059..0eb8eac 100644
--- a/src/main/res/layout/triblurlayout.xml
+++ b/src/main/res/layout/triblurlayout.xml
@@ -10,6 +10,30 @@
         android:layout_height="0dp"
         android:layout_weight="1" />
 
+
+    <LinearLayout
+        android:id="@+id/linearLayout3"
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:gravity="center|fill_horizontal"
+        android:orientation="horizontal"
+        android:background="@color/blue">
+
+        <Spinner
+            android:layout_width="0dp"
+            android:layout_height="50dp"
+            android:layout_weight="0.5"
+            android:id="@+id/triblur_spinnerQuality"
+            />
+
+        <Spinner
+            android:layout_width="0dp"
+            android:layout_height="50dp"
+            android:layout_weight="0.5"
+            android:id="@+id/triblur_spinnerMode"
+            />
+    </LinearLayout>
+
     <LinearLayout
         android:orientation="horizontal"
         android:background="@color/red"
@@ -130,61 +154,4 @@
 
     </LinearLayout>
 
-    <LinearLayout
-        android:id="@+id/linearLayout3"
-        android:layout_width="fill_parent"
-        android:layout_height="wrap_content"
-        android:gravity="center|fill_horizontal"
-        android:orientation="horizontal"
-        android:background="@color/blue"
-        android:paddingBottom="10dp"
-        android:paddingTop="10dp" >
-
-        <RadioGroup
-            android:id="@+id/triblurRadioGroup"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:orientation="horizontal">
-
-            <RadioButton
-                android:id="@+id/triblurRadioQuality0"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_weight="1"
-                android:onClick="quality"
-                android:text="@string/quality0"
-                android:textSize="14sp"/>
-
-            <RadioButton
-                android:id="@+id/triblurRadioQuality1"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_weight="1"
-                android:checked="true"
-                android:onClick="quality"
-                android:text="@string/quality1"
-                android:textSize="14sp"/>
-
-            <RadioButton
-                android:id="@+id/triblurRadioQuality2"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_weight="1"
-                android:onClick="quality"
-                android:text="@string/quality2"
-                android:textSize="14sp"/>
-
-            <RadioButton
-                android:id="@+id/triblurRadioQuality3"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_weight="1"
-                android:onClick="quality"
-                android:text="@string/quality3"
-                android:textSize="14sp"/>
-
-        </RadioGroup>
-
-    </LinearLayout>
-
 </LinearLayout>
\ No newline at end of file
