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/surfaceview/RenderThread.java
294 294
    android.util.Log.e("SurfaceView", ex.getMessage() );
295 295
    }
296 296

  
297
///////////////////////////////////////////////////////////////////////////////////////////////////
298

  
299
  public int openGlVersion()
300
    {
301
    Context context = mView.getContext();
302
    final ActivityManager activityManager     = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
303
    final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo();
304
    int glESversion = configurationInfo.reqGlEsVersion;
305
    int major = glESversion >> 16;
306
    int minor = glESversion & 0xff;
307

  
308
    return 100*major + 10*minor;
309
    }
310

  
311 297
///////////////////////////////////////////////////////////////////////////////////////////////////
312 298

  
313 299
  public InputStream localFile(int fileID)

Also available in: Unified diff