From d9fd3c6c6061c8f75e0a68f86899f3fe01c67651 Mon Sep 17 00:00:00 2001 From: James Chen Date: Sat, 26 Jan 2013 14:20:24 +0800 Subject: [PATCH] issue #1683: Fixed an issue about OPENGLES ERROR 501 Warning in CCTextureAtlas.cpp. --- cocos2dx/textures/CCTextureAtlas.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cocos2dx/textures/CCTextureAtlas.cpp b/cocos2dx/textures/CCTextureAtlas.cpp index 6c9c9cc1f4..c69e749751 100644 --- a/cocos2dx/textures/CCTextureAtlas.cpp +++ b/cocos2dx/textures/CCTextureAtlas.cpp @@ -603,7 +603,7 @@ void CCTextureAtlas::drawNumberOfQuads(unsigned int n, unsigned int start) { glBindBuffer(GL_ARRAY_BUFFER, m_pBuffersVBO[0]); // option 1: subdata - glBufferSubData(GL_ARRAY_BUFFER, sizeof(m_pQuads[0])*start, sizeof(m_pQuads[0]) * n , &m_pQuads[start] ); + //glBufferSubData(GL_ARRAY_BUFFER, sizeof(m_pQuads[0])*start, sizeof(m_pQuads[0]) * n , &m_pQuads[start] ); // option 2: data // glBufferData(GL_ARRAY_BUFFER, sizeof(quads_[0]) * (n-start), &quads_[start], GL_DYNAMIC_DRAW); @@ -619,7 +619,7 @@ void CCTextureAtlas::drawNumberOfQuads(unsigned int n, unsigned int start) m_bDirty = false; } - glBindVertexArray(m_uVAOname); + ccGLBindVAO(m_uVAOname); #if CC_REBIND_INDICES_BUFFER glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_pBuffersVBO[1]); @@ -635,7 +635,7 @@ void CCTextureAtlas::drawNumberOfQuads(unsigned int n, unsigned int start) glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); #endif - glBindVertexArray(0); +// glBindVertexArray(0); #else // ! CC_TEXTURE_ATLAS_USE_VAO