Merge pull request #275 from vvaldik/master

[cocos2dx] PolygonBatch::flush crash fix
This commit is contained in:
Nathan Sweet 2014-08-31 15:58:00 +02:00
commit c993b4984d
3 changed files with 3 additions and 0 deletions

View File

@ -94,6 +94,7 @@ void PolygonBatch::flush () {
if (!verticesCount) return;
GL::bindTexture2D(texture->getName());
GL::bindVAO(0);
glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_POSITION);
glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_COLOR);
glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_TEX_COORDS);

View File

@ -94,6 +94,7 @@ void PolygonBatch::flush () {
if (!verticesCount) return;
GL::bindTexture2D(texture->getName());
GL::bindVAO(0);
glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_POSITION);
glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_COLOR);
glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_TEX_COORDS);

View File

@ -94,6 +94,7 @@ void PolygonBatch::flush () {
if (!_verticesCount) return;
GL::bindTexture2D(_texture->getName());
GL::bindVAO(0);
glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_POSITION);
glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_COLOR);
glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_TEX_COORDS);