commit a2d56cfd42ec3f490ae2d04537a7a2420ca8765b
Author: Leszek Koltunski <leszek@distoretedandroid.org>
Date:   Fri Jun 16 15:33:18 2017 +0100

    Change of API: move setting the EGL context back to the APP.

diff --git a/src/main/java/org/distorted/library/main/Distorted.java b/src/main/java/org/distorted/library/main/Distorted.java
index 8f296b7..b7159ef 100644
--- a/src/main/java/org/distorted/library/main/Distorted.java
+++ b/src/main/java/org/distorted/library/main/Distorted.java
@@ -155,4 +155,13 @@ public class Distorted
 
     mInitialized = false;
     }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Return 2 or 3 depending if we have OpenGL Es 2.0 or 3.x context created.
+ */
+  public static int getGlVersion()
+    {
+    return GLSL == 300 ? 3:2;
+    }
   }
\ No newline at end of file
diff --git a/src/main/java/org/distorted/library/main/DistortedScreen.java b/src/main/java/org/distorted/library/main/DistortedScreen.java
index 303c36d..31ab5fe 100644
--- a/src/main/java/org/distorted/library/main/DistortedScreen.java
+++ b/src/main/java/org/distorted/library/main/DistortedScreen.java
@@ -139,20 +139,12 @@ public class DistortedScreen extends DistortedOutputSurface
  * <p>
  * Has to be followed by a 'resize()' to set the size.
  */
-  public DistortedScreen(GLSurfaceView view)
+  public DistortedScreen()
     {
     // set color to 'DONT_CREATE' so that Screens will not get added to the Surface lists
     // set depth to 'CREATED' so that depth will be, by default, on.
     super(0,0,DONT_CREATE,1,DEPTH_NO_STENCIL,0,TYPE_USER);
 
-    if( view!=null )
-      {
-      Context context = view.getContext();
-      final ActivityManager activityManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
-      final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo();
-      view.setEGLContextClientVersion((configurationInfo.reqGlEsVersion >> 16) >= 3 ? 3 : 2);
-      }
-
     mInitialized = false;
     }
   }
