Project

General

Profile

« Previous | Next » 

Revision e4330c89

Added by Leszek Koltunski almost 7 years ago

Change of API: move setting the EGL context back to the APP.

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;
22 23
import android.content.Context;
24
import android.content.pm.ConfigurationInfo;
23 25
import android.opengl.GLSurfaceView;
24 26
import android.view.MotionEvent;
25 27
import android.util.AttributeSet;
......
90 92
      setFocusable(true);
91 93
      setFocusableInTouchMode(true);
92 94
      mRenderer = new EffectQueueRenderer(this);
95
      final ActivityManager activityManager     = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
96
      final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo();
97
      setEGLContextClientVersion( (configurationInfo.reqGlEsVersion>>16) >= 3 ? 3:2 );
93 98
      setRenderer(mRenderer);
94 99
      mRegionV= new Static4D(0,0,RADIUS,RADIUS);
95 100
      setEffect(0);  

Also available in: Unified diff