From 1a0b4f26fb0023f7decb7aac13efa31afe2ebf5d Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Thu, 28 Mar 2024 19:00:09 +0100 Subject: [PATCH] Reverted c8cf6cb and try another place to unbind buffer instead --- src/gl/buffers.c | 1 + src/gl/fpe.c | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/gl/buffers.c b/src/gl/buffers.c index a9909176a..4ea062cb5 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 495bb215c..23748ed6a 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)