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/generic/GenericRenderer.java
336 336
      android.util.Log.e("Generic", ex.getMessage() );
337 337
      }
338 338

  
339
///////////////////////////////////////////////////////////////////////////////////////////////////
340

  
341
   public int openGlVersion()
342
      {
343
      Context context = mView.getContext();
344
      final ActivityManager activityManager     = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
345
      final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo();
346
      int glESversion = configurationInfo.reqGlEsVersion;
347
      int major = glESversion >> 16;
348
      int minor = glESversion & 0xff;
349

  
350
      return 100*major + 10*minor;
351
      }
352

  
353 339
///////////////////////////////////////////////////////////////////////////////////////////////////
354 340

  
355 341
   public InputStream localFile(int fileID)

Also available in: Unified diff