I am using this code to get OpenGL ES version on my phone.
int result;
ActivityManager activityManager = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE);
ConfigurationInfo configInfo = activityManager
.getDeviceConfigurationInfo();
if (configInfo.reqGlEsVersion != ConfigurationInfo.GL_ES_VERSION_UNDEFINED) {
result = configInfo.reqGlEsVersion;
} else {
result = 1 << 16; // Lack of property means OpenGL ES version 1
}
Log.e("reqGlEsVersion", String.valueOf(result));
Log.e("getGlEsVersion", configInfo.getGlEsVersion());
I have found this code from this link: Is there a way to check if Android device supports openGL ES 2.0?
On my Nexus 5, I am getting GLES version as 3.0. But according to this doc, http://developer.android.com/guide/topics/graphics/opengl.html, I should get 3.1 because "OpenGL ES 3.1 - This API specification is supported by Android 5.0 (API level 21) and higher."
I think I should get 3.1 as OpenGL ES version. Can anyone tell me why I am getting 3.0 as OpenGL ES version ?