Revision 6f3a9b2a
Added by Leszek Koltunski about 7 years ago
src/main/java/org/distorted/examples/matrix3d/Matrix3DSurfaceView.java | ||
---|---|---|
41 | 41 |
{ |
42 | 42 |
final ActivityManager activityManager = (android.app.ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); |
43 | 43 |
final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo(); |
44 |
android.util.Log.e("View", "Using OpenGL ES "+configurationInfo.getGlEsVersion()); |
|
45 | 44 |
setEGLContextClientVersion( (configurationInfo.reqGlEsVersion>>16) >= 3 ? 3:2 ); |
46 | 45 |
mRenderer = new Matrix3DRenderer(this); |
47 | 46 |
setRenderer(mRenderer); |
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.