Revision 6f3a9b2a
Added by Leszek Koltunski about 7 years ago
src/main/java/org/distorted/examples/effectqueue/EffectQueueSurfaceView.java | ||
---|---|---|
89 | 89 |
setFocusableInTouchMode(true); |
90 | 90 |
final ActivityManager activityManager = (android.app.ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); |
91 | 91 |
final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo(); |
92 |
android.util.Log.e("View", "Using OpenGL ES "+configurationInfo.getGlEsVersion()); |
|
93 | 92 |
setEGLContextClientVersion( (configurationInfo.reqGlEsVersion>>16) >= 3 ? 3:2 ); |
94 | 93 |
|
95 | 94 |
mRenderer = new EffectQueueRenderer(this); |
Also available in: Unified diff
It now automatically chooses OpenGL ES 2.0 and GLSL 100 or OpenGL ES 3.0 and GLSL 300.
Postprocessing effects will not work on OpenGL ES 2.0 contexts.