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/triblur/TriblurRenderer.java
277 277
      android.util.Log.e("Triblur", ex.getMessage() );
278 278
      }
279 279

  
280
///////////////////////////////////////////////////////////////////////////////////////////////////
281

  
282
    public int openGlVersion()
283
      {
284
      Context context = mView.getContext();
285
      final ActivityManager activityManager     = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
286
      final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo();
287
      int glESversion = configurationInfo.reqGlEsVersion;
288
      int major = glESversion >> 16;
289
      int minor = glESversion & 0xff;
290

  
291
      return 100*major + 10*minor;
292
      }
293

  
294 280
///////////////////////////////////////////////////////////////////////////////////////////////////
295 281

  
296 282
    public InputStream localFile(int fileID)

Also available in: Unified diff