commit 3c26029b95c93f5f6514db104b7db448ff13bac5
Author: Leszek Koltunski <leszek@koltunski.pl>
Date:   Fri Mar 31 17:48:49 2023 +0200

    Decouple (to a large degree) the OpenGL Library from Android.

diff --git a/src/main/java/org/distorted/library/main/DistortedLibrary.java b/src/main/java/org/distorted/library/main/DistortedLibrary.java
index 4910900..c5f8bb2 100644
--- a/src/main/java/org/distorted/library/main/DistortedLibrary.java
+++ b/src/main/java/org/distorted/library/main/DistortedLibrary.java
@@ -221,7 +221,6 @@ public class DistortedLibrary
   public interface LibraryUser
     {
     void distortedException(Exception ex);
-    int openGlVersion();
     InputStream localFile(int fileID);
     void logMessage(String message);
     }
@@ -971,6 +970,17 @@ public class DistortedLibrary
       }
     }
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  private static int getVersion()
+    {
+    int[] major = new int[1];
+    int[] minor = new int[1];
+    GLES30.glGetIntegerv(GLES30.GL_MAJOR_VERSION, major, 0);
+    GLES30.glGetIntegerv(GLES30.GL_MINOR_VERSION, minor, 0);
+    return major[0] * 100 + minor[0] * 10;
+    }
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 /**
  * Not an external API
@@ -1021,7 +1031,7 @@ public class DistortedLibrary
   public static void onSurfaceCreated(final LibraryUser user, int queueSize)
     {
     mUser = user;
-    int version = mUser.openGlVersion();
+    int version = getVersion();
     int major = version/100;
     int minor = ((version/10)%10);
 
