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/meshfile/MeshFileRenderer.java
412 412
      android.util.Log.e("MeshFile", ex.getMessage() );
413 413
      }
414 414

  
415
///////////////////////////////////////////////////////////////////////////////////////////////////
416

  
417
    public int openGlVersion()
418
      {
419
      Context context = mView.getContext();
420
      final ActivityManager activityManager     = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
421
      final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo();
422
      int glESversion = configurationInfo.reqGlEsVersion;
423
      int major = glESversion >> 16;
424
      int minor = glESversion & 0xff;
425

  
426
      return 100*major + 10*minor;
427
      }
428

  
429 415
///////////////////////////////////////////////////////////////////////////////////////////////////
430 416

  
431 417
    public InputStream localFile(int fileID)

Also available in: Unified diff