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/deform/DeformRenderer.java
330 330
     android.util.Log.e("Deform", ex.getMessage() );
331 331
     }
332 332

  
333
///////////////////////////////////////////////////////////////////////////////////////////////////
334

  
335
   public int openGlVersion()
336
      {
337
      Context context = mView.getContext();
338
      final ActivityManager activityManager     = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
339
      final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo();
340
      int glESversion = configurationInfo.reqGlEsVersion;
341
      int major = glESversion >> 16;
342
      int minor = glESversion & 0xff;
343

  
344
      return 100*major + 10*minor;
345
      }
346

  
347 333
///////////////////////////////////////////////////////////////////////////////////////////////////
348 334

  
349 335
   public InputStream localFile(int fileID)

Also available in: Unified diff