Bug #1229 [Closed]
(gles20) android port can not be compiled on ndk android-8 level
> Official Android 1.5 system images> Official Android 1.6 system images
> Official Android 2.0 system images> Official Android 2.0.1 system images
> Official Android 2.1 system images> Official Android 2.2 system images
> Official Android 2.3 system images> Official Android 2.3.3 system images
android-14 -> Official Android 4.0 system images
Currently in gles20 branch’s project.porperties, android-10 is required, which means 2.0 games can only run on android 2.3.3 or higher devices.
THIS IS UNACCEPTABLE.
Finally I find that gles20 depends on android-9 and higher, coz CCEGLView includes EGL/egl.h, while android-8 has no EGL headers.
We depends EGL to get only 3 APIs,
In CCGL.h, these 3 APIs are redefined
#define glDeleteVertexArrays glDeleteVertexArraysOES #define glGenVertexArrays glGenVertexArraysOES #define glBindVertexArray glBindVertexArrayOES
And finally they are invoked in CCParticleSystemQuad.cpp & CCTextureAtlas.cpp, with a pre-condition that marco CC_TEXTURE_ATLAS_USE_VAO 1
CC_TEXTURE_ATLAS_USE_VAO marco is defined in ccConfig.h
#if (CC_TARGET_PLATFORM CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM CC_PLATFORM_WIN32)
#define CC_TEXTURE_ATLAS_USE_VAO 1
/* Some android devices cannot support VAO very well, so we disable it by default for android platform. */
#define CC_TEXTURE_ATLAS_USE_VAO 0
So it means on android platform CC_TEXTURE_ATLAS_USE_VAO 0, it’s disabled.
OK, so if your game is very performance-hungry, you can enable CC_TEXTURE_ATLAS_USE_VAO to run it faster, but your game is limited to android 2.3 and higher devices,
By default, we should disable CC_TEXTURE_ATLAS_USE_VAO to adapt games on wider range.
By walzer Posted 2012-05-05 02:05
Caution: OpenGL ES 2.0 is currently not supported by the Android Emulator. You must have a physical test device running Android 2.2 (API Level 8) or higher in order to run and test the example code in this tutorial.
By walzer Posted 2012-05-05 02:25
- Status changed from New to Resolved
- % Done changed from 0 to 100
Applied in changeset commit:435c74e52c5b18ae7e0f6257711e251330362881.
By zhangxm Posted 2012-05-07 09:10
>> OK, so if your game is very performance-hungry, you can enable CC_TEXTURE_ATLAS_USE_VAO to run it faster, but your game is limited to android 2.3 and higher devices,
No, Android can not work correctly if CC_TEXTURE_ATLAS_USE_VAO is set to 1.
It meas, Android dones’t support opengl es 20 very well.
You can not use these three opengl es functions on Android.
By walzer Posted 2012-05-08 05:49
- Status changed from Resolved to Closed
By walzer Posted 2012-05-25 07:57
- Project changed from cocos2d-x to cpp
- Category deleted (
By walzer Posted 2012-05-25 07:58
- Target version deleted (
By walzer Posted 2012-05-25 09:25
- Target version set to cocos2d-2.0-rc0a-x-2.0