android - 有没有办法检查 Android 设备是否支持 openGL ES 2.0?

标签 android opengl-es opengl-es-2.0

我需要动态检查使用的设备是否支持 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" />

另见 the doc of uses-feature .

关于android - 有没有办法检查 Android 设备是否支持 openGL ES 2.0?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9198293/

相关文章:

ios - Xcode 4.3.1 纹理工具丢失了吗?

c# - 将自定义对象传递给 Xamarin Android 中的下一个 Activity

带有从网络流式传输的图像的 Android 页面 curl ?

ios - Swift OpenGL es 枚举

ios - 为每个线程创建EAGLContext可以吗?

安卓弹出窗口

java - Activity 和服务之间的事件总线通信

Android firestore RecyclerView 正在加载错误的图像

android - 芯片组多排芯片

ios - OpenGL ES 2.0 线条看起来比 Core Animation 更锯齿。在 iOS 4 中可以抗锯齿吗?