diff --git a/cocos2dx/textures/CCTextureAtlas.cpp b/cocos2dx/textures/CCTextureAtlas.cpp index 7c0abbf4b1..b226e02cea 100644 --- a/cocos2dx/textures/CCTextureAtlas.cpp +++ b/cocos2dx/textures/CCTextureAtlas.cpp @@ -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 \ No newline at end of file