Project

General

Profile

« Previous | Next » 

Revision 625c67de

Added by Leszek Koltunski about 1 year ago

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

View differences:

src/main/java/org/distorted/examples/predeform/PredeformRenderer.java
198 198
      android.util.Log.e("Predeform", ex.getMessage() );
199 199
      }
200 200

  
201
///////////////////////////////////////////////////////////////////////////////////////////////////
202

  
203
    public int openGlVersion()
204
      {
205
      Context context = mView.getContext();
206
      final ActivityManager activityManager     = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
207
      final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo();
208
      int glESversion = configurationInfo.reqGlEsVersion;
209
      int major = glESversion >> 16;
210
      int minor = glESversion & 0xff;
211

  
212
      return 100*major + 10*minor;
213
      }
214

  
215 201
///////////////////////////////////////////////////////////////////////////////////////////////////
216 202

  
217 203
    public InputStream localFile(int fileID)

Also available in: Unified diff