关于 动画在部分型号的安卓手机上播放会不正常的问题
现在有两个暂时的解决方案
1:
在 CCSpriteFrameCacheHelper里面 的
找到CCTextureAtlas *CCSpriteFrameCacheHelper::getTexureAtlasWithTexture(CCTexture2D *texture) 函数
修改 atlas = CCTextureAtlas::createWithTexture(texture, 4);
为 atlas = CCTextureAtlas::createWithTexture(texture, 32); 或者 更高的数
2:
这个是 cocos2d-x 提供的 暂时的方法,用的是一个不太高效但是比较安全的办法解决问题的
在 CCTextureAtlas 里面找到
bool CCTextureAtlas::resizeCapacity(unsigned int newCapacity) 函数
修改
mapBuffers();
为
#if CC_TEXTURE_ATLAS_USE_VAO
glDeleteVertexArrays(1,&m_uVAOname);
#endif
glDeleteBuffers(2, m_pBuffersVBO);
#if CC_TEXTURE_ATLAS_USE_VAO
setupVBOandVAO();
#else
setupVBO();
#endif
//mapBuffers();
