From 0ca47ab40faeb560e3a7084783112987fc76e65b Mon Sep 17 00:00:00 2001 From: "Huabing.Xu" Date: Wed, 21 Jan 2015 14:14:53 +0800 Subject: [PATCH] fix crash for textureAtlas --- cocos/renderer/CCTextureAtlas.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cocos/renderer/CCTextureAtlas.cpp b/cocos/renderer/CCTextureAtlas.cpp index 2608dc2a92..630236c571 100644 --- a/cocos/renderer/CCTextureAtlas.cpp +++ b/cocos/renderer/CCTextureAtlas.cpp @@ -642,7 +642,9 @@ void TextureAtlas::drawNumberOfQuads(ssize_t numberOfQuads, ssize_t start) #endif glDrawElements(GL_TRIANGLES, (GLsizei) numberOfQuads*6, GL_UNSIGNED_SHORT, (GLvoid*) (start*6*sizeof(_indices[0])) ); - + + GL::bindVAO(0); + #if CC_REBIND_INDICES_BUFFER glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); #endif