PolygonBatch::flush crash fix

This commit is contained in:
Vladislav Cecalenco 2014-08-27 21:02:53 +03:00
parent 059cc69a31
commit 19272feb4e
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);