我需要动态检查使用的设备是否支持 openGL ES 2.0。 我该怎么做?
最佳答案
是的。以下代码可以解决问题:
final ActivityManager activityManager =
(ActivityManager) getSystemService(Context.ACTIVITY_SERVICE);
final ConfigurationInfo configurationInfo =
activityManager.getDeviceConfigurationInfo();
final boolean supportsEs2 = configurationInfo.reqGlEsVersion >= 0x20000;
阅读本文了解更多信息: http://www.learnopengles.com/android-lesson-one-getting-started/
您可能还需要通过将以下内容添加到 list 中来限制不支持 2.0 的设备在市场上看到您的应用:
<uses-feature android:glEsVersion="0x00020000" android:required="true" />
关于android - 有没有办法检查 Android 设备是否支持 openGL ES 2.0?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9198293/