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

View File

@ -346,6 +346,13 @@ bool CCTextureAtlas::resizeCapacity(unsigned int newCapacity)
m_pQuads = (ccV3F_C4B_T2F_Quad *)tmpQuads;
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();
#if CC_USES_VBO
@ -444,4 +451,4 @@ void CCTextureAtlas::drawNumberOfQuads(unsigned int n, unsigned int start)
}
}//namespace cocos2d
}//namespace cocos2d