Project

General

Profile

« Previous | Next » 

Revision 1f9a52f1

Added by Leszek Koltunski almost 7 years ago

Simplify setting up DistortedScreen.

View differences:

src/main/java/org/distorted/examples/multiblur/MultiblurSurfaceView.java
19 19

  
20 20
package org.distorted.examples.multiblur;
21 21

  
22
import android.app.ActivityManager;
23 22
import android.content.Context;
24
import android.content.pm.ConfigurationInfo;
25 23
import android.opengl.GLSurfaceView;
26 24
import android.util.AttributeSet;
27 25
import android.view.MotionEvent;
......
47 45
      
48 46
      if(!isInEditMode())
49 47
        {
50
        final ActivityManager activityManager     = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
51
        final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo();
52
        setEGLContextClientVersion( (configurationInfo.reqGlEsVersion>>16) >= 3 ? 3:2 );
53 48
        mRenderer = new MultiblurRenderer(this);
54 49
        setRenderer(mRenderer);
55 50
        Toast.makeText(context, R.string.example_rotate_toast , Toast.LENGTH_SHORT).show();

Also available in: Unified diff