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/effectqueue/EffectQueueSurfaceView.java
19 19

  
20 20
package org.distorted.examples.effectqueue;
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.view.MotionEvent;
27 25
import android.util.AttributeSet;
......
87 85
      {
88 86
      setFocusable(true);
89 87
      setFocusableInTouchMode(true);
90
      final ActivityManager activityManager     = (android.app.ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
91
      final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo();
92
      setEGLContextClientVersion( (configurationInfo.reqGlEsVersion>>16) >= 3 ? 3:2 );
93 88

  
94 89
      mRenderer = new EffectQueueRenderer(this);
95 90
      setRenderer(mRenderer);

Also available in: Unified diff