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/earth/EarthRenderer.java
288 288
      android.util.Log.e("Earth", ex.getMessage() );
289 289
      }
290 290

  
291
///////////////////////////////////////////////////////////////////////////////////////////////////
292

  
293
    public int openGlVersion()
294
      {
295
      Context context = mView.getContext();
296
      final ActivityManager activityManager     = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
297
      final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo();
298
      int glESversion = configurationInfo.reqGlEsVersion;
299
      int major = glESversion >> 16;
300
      int minor = glESversion & 0xff;
301

  
302
      return 100*major + 10*minor;
303
      }
304

  
305 291
///////////////////////////////////////////////////////////////////////////////////////////////////
306 292

  
307 293
    public InputStream localFile(int fileID)

Also available in: Unified diff