解决方案来自: stackoverflow
问题是随机崩溃GL渲染错误,位置在CCTextureAtlas的这一行:
glDrawElements(GL_TRIANGLES,(GLsizei) n*6,GL_UNSIGNED_SHORT,(GLvoid*) (start*6*sizeof(_indices[0])) );
ccGLBindVAO(0);
指定语句:
glDeleteVertexArrays(1,&_VAOname);
在这些代码中
CCDrawNode:164
CCTextureAtlas:142
CCParticleSystemQuad:164
CCParticleSystemQuad:229
CCParticleSystemQuad:492
例子: (CCTextureAtlas中)
#if CC_TEXTURE_ATLAS_USE_VAO
glDeleteVertexArrays(1,&_VAOname);
ccGLBindVAO(0);
#endif