mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
PolygonBatch::flush crash fix
This commit is contained in:
parent
059cc69a31
commit
19272feb4e
@ -94,6 +94,7 @@ void PolygonBatch::flush () {
|
|||||||
if (!verticesCount) return;
|
if (!verticesCount) return;
|
||||||
|
|
||||||
GL::bindTexture2D(texture->getName());
|
GL::bindTexture2D(texture->getName());
|
||||||
|
GL::bindVAO(0);
|
||||||
glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_POSITION);
|
glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_POSITION);
|
||||||
glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_COLOR);
|
glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_COLOR);
|
||||||
glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_TEX_COORDS);
|
glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_TEX_COORDS);
|
||||||
|
|||||||
@ -94,6 +94,7 @@ void PolygonBatch::flush () {
|
|||||||
if (!verticesCount) return;
|
if (!verticesCount) return;
|
||||||
|
|
||||||
GL::bindTexture2D(texture->getName());
|
GL::bindTexture2D(texture->getName());
|
||||||
|
GL::bindVAO(0);
|
||||||
glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_POSITION);
|
glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_POSITION);
|
||||||
glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_COLOR);
|
glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_COLOR);
|
||||||
glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_TEX_COORDS);
|
glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_TEX_COORDS);
|
||||||
|
|||||||
@ -94,6 +94,7 @@ void PolygonBatch::flush () {
|
|||||||
if (!_verticesCount) return;
|
if (!_verticesCount) return;
|
||||||
|
|
||||||
GL::bindTexture2D(_texture->getName());
|
GL::bindTexture2D(_texture->getName());
|
||||||
|
GL::bindVAO(0);
|
||||||
glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_POSITION);
|
glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_POSITION);
|
||||||
glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_COLOR);
|
glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_COLOR);
|
||||||
glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_TEX_COORDS);
|
glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_TEX_COORDS);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user