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/transparency/TransparencyRenderer.java
233 233
      android.util.Log.e("Transparency", ex.getMessage() );
234 234
      }
235 235

  
236
///////////////////////////////////////////////////////////////////////////////////////////////////
237

  
238
    public int openGlVersion()
239
      {
240
      Context context = mView.getContext();
241
      final ActivityManager activityManager     = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
242
      final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo();
243
      int glESversion = configurationInfo.reqGlEsVersion;
244
      int major = glESversion >> 16;
245
      int minor = glESversion & 0xff;
246

  
247
      return 100*major + 10*minor;
248
      }
249

  
250 236
///////////////////////////////////////////////////////////////////////////////////////////////////
251 237

  
252 238
    public InputStream localFile(int fileID)

Also available in: Unified diff