开发者

Android runs OpenGL ES 1.1 or 1.0?

I'm developing a native app for Android and I'm trying to use functions such as glIsEnabled which appear to be only available in OpenGL ES 1.1. Google's docs claim that NDK 1.6R1 supports OpenGL ES v1.1 but the function call fails with "unimplemented Open GL ES API" and if i do a glGetString(GL_VERSION) it returns "OpenGL ES 1.0 CM" as the version.

So if 1.1 is available, what do I have to link against to get it 开发者_运维百科or what else do i need to change to get it?


You can't count on anything higher than OpenGL ES 1.0, if you want to run on all Android devices. But if you absolutely need some OpenGL ES 1.1 methods you can define a minGLVersion in your manifest file and it will keep people from downloading it on unsupported devices. That looks like this:

// the high 16 bit define the Major Version,
// the low 16 bits define the Minor Version,
// so this is OpenGL ES 1.1
<uses-feature android:glEsVersion="0x00010001" />


The Android docs say (3D with OpenGL):

Finally, note that though Android does include some basic support for OpenGL ES 1.1, the support is not complete, and should not be relied upon at this time.

I'm guessing that this is the same with the NDK.


If you use t NDK to create a native library that uses the OpenGL ES APIs, the application containing the library can be deployed only to devices running the minimum platform versions described in the table below.

OpenGL ES Version Compatible Android Platform(s) Required uses-sdk Attribute OpenGL ES 1.1 Android 1.6 and higher android:minSdkVersion="4" OpenGL ES 2.0 Android 2.0 and higher android:minSdkVersion="5"

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜