android - eclipse 和 opengl-es-2.0,info.reqGlEsVersion 为零

标签 android eclipse opengl-es-2.0

当我尝试使用 adt 和 od 在 eclipse 中运行一个程序时,检查

if(info.reqGlEsVersion <  0x20000)

总是失败。 我设置了一个断点并查看了 info 对象,reqGlEsVersion0

我用多个虚拟设备和 api 对此进行了测试,一个版本为 2.3.3,另一个版本为 3.0。据我所知,gl es 2.0 的最低要求是 android 2.2,因此它应该可以正常运行。除了更改 api,我还使用了设备快照选项和标准配置

我是否错过了一些配置步骤或其他什么?

顺便说一下,eclipse 版本是 2.5.1

最佳答案

我听从了这个链接的建议 http://www.learnopengles.com/android-emulator-now-supports-native-opengl-es2-0/

来自链接的评论是:

Two notes about the GPU emulation

First, you need to edit your emulator image, go down to the hardware section, and add “GPU Emulation” and set it to true.

Second, there’s a bug with the emulator such that this line: “final boolean supportsEs2 = configurationInfo.reqGlEsVersion >= 0×20000;” does not work. It will always return false. You can add “|| Build.FINGERPRINT.startsWith(“generic”)” or simply comment out these checks and assume that OpenGL ES 2 is supported, when running on the emulator.

关于android - eclipse 和 opengl-es-2.0,info.reqGlEsVersion 为零,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7190240/

相关文章:

android - GCM 如何识别推送通知中的设备?

java - 如何在 Android 的 TextView 中随机设置文本?

java - 无法正确查看 JFace 对话框中的小部件

java - eclipse中打包可执行jar文件报错

android - 如何在 OpenGL ES 2.0 着色器中处理 NaN 或 inf

opengl-es - 关于 glteximage2d 使用 gl_luminance 的谜题

android - ActionBar Sherlock - Actionbar 中的背景图像

java - 具有抽象函数的 Java 枚举有哪些非抽象版本不能做的事情? (即是否存在技术差异,或者只是一种模式?)

java - 如何刷新 Eclipse View 插件

android - 着色器代码中的 for 循环使用硬编码数字但不使用统一变量