when CCTextureAtlas::resizeCapacity, should

glDeleteBuffers(2, m_pBuffersVBO);
// initial binding
glGenBuffers(2, &m_pBuffersVBO[0]);
otherwise, CCSpriteBatchNode will have a bug the can't draw more than one sprite on bada 2.0 device.
This commit is contained in:
dumganhar 2011-11-13 00:57:05 +08:00
parent ea3b57ea2c
commit 25ab866557
1 changed files with 8 additions and 1 deletions
cocos2dx/textures

View File

@ -346,6 +346,13 @@ bool CCTextureAtlas::resizeCapacity(unsigned int newCapacity)
m_pQuads = (ccV3F_C4B_T2F_Quad *)tmpQuads; m_pQuads = (ccV3F_C4B_T2F_Quad *)tmpQuads;
m_pIndices = (GLushort *)tmpIndices; m_pIndices = (GLushort *)tmpIndices;
#if CC_USES_VBO
glDeleteBuffers(2, m_pBuffersVBO);
// initial binding
glGenBuffers(2, &m_pBuffersVBO[0]);
m_bDirty = true;
#endif // CC_USES_VBO
this->initIndices(); this->initIndices();
#if CC_USES_VBO #if CC_USES_VBO