From a626271b06f2ee7f2577f926a0359c44a6462552 Mon Sep 17 00:00:00 2001 From: James Chen Date: Wed, 28 Mar 2012 22:01:12 +0800 Subject: [PATCH] issue #1056: Made setupVBO as CCTextureAtlas's member function. --- cocos2dx/textures/CCTextureAtlas.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cocos2dx/textures/CCTextureAtlas.cpp b/cocos2dx/textures/CCTextureAtlas.cpp index 8ae0041460..a311a6cf49 100644 --- a/cocos2dx/textures/CCTextureAtlas.cpp +++ b/cocos2dx/textures/CCTextureAtlas.cpp @@ -256,7 +256,7 @@ void CCTextureAtlas::setupVBOandVAO() CHECK_GL_ERROR_DEBUG(); } #else // CC_TEXTURE_ATLAS_USE_VAO -void setupVBO() +void CCTextureAtlas::setupVBO() { glGenBuffers(2, &m_pBuffersVBO[0]); @@ -606,7 +606,7 @@ void CCTextureAtlas::drawNumberOfQuads(unsigned int n, unsigned int start) #if CC_TEXTURE_ATLAS_USE_TRIANGLE_STRIP glDrawElements(GL_TRIANGLE_STRIP, (GLsizei) n*6, GL_UNSIGNED_SHORT, (GLvoid*) (start*6*sizeof(m_pIndices[0])) ); #else - glDrawElements(GL_TRIANGLES, (GLsizei) n*6, GL_UNSIGNED_SHORT, (GLvoid*) (start*6*sizeof(m_pIndices[0])) ); + glDrawElements(GL_TRIANGLES, (GLsizei) n*6, GL_UNSIGNED_SHORT, (GLvoid*) m_pIndices/*(start*6*sizeof(m_pIndices[0]))*/ ); #endif // CC_TEXTURE_ATLAS_USE_TRIANGLE_STRIP glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);