diff --git a/src/gl/buffers.c b/src/gl/buffers.c index a9909176..4ea062cb 100644 --- a/src/gl/buffers.c +++ b/src/gl/buffers.c @@ -137,6 +137,7 @@ void APIENTRY_GL4ES gl4es_glBindBuffer(GLenum target, GLuint buffer) { // if buffer = 0 => unbind buffer! if (buffer == 0) { // unbind buffer + bindBuffer(target, 0); unbind_buffer(target); } else { // search for an existing buffer diff --git a/src/gl/fpe.c b/src/gl/fpe.c index 495bb215..23748ed6 100644 --- a/src/gl/fpe.c +++ b/src/gl/fpe.c @@ -815,10 +815,6 @@ void APIENTRY_GL4ES fpe_glDrawElements(GLenum mode, GLsizei count, GLenum type, indices = (GLvoid*)((uintptr_t)indices - (uintptr_t)(glstate->vao->elements->data)); DBG(printf("Using VBO %d for indices\n", glstate->vao->elements->real_buffer);) } - if (!glstate->vao->elements) { - bindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); - DBG(printf("Unloading EBO\n")); - } realize_bufferIndex(); gles_glDrawElements(mode, count, type, indices); if(use_vbo)