I need to check dynamically if the used device supports openGL ES 2.0. How can i do that?
You can use this code in your code:
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());