From d8f1ee87cda8302ab9560d0e81f7cee512b1a505 Mon Sep 17 00:00:00 2001 From: Duy Tran Khanh <40482367+khanhduytran0@users.noreply.github.com> Date: Mon, 6 Mar 2023 21:56:21 +0700 Subject: [PATCH 1/2] Fix glGenBuffers usage in gl4es_scratch_* --- src/gl/gl4es.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gl/gl4es.c b/src/gl/gl4es.c index 8809fbfba..e7c294b4f 100644 --- a/src/gl/gl4es.c +++ b/src/gl/gl4es.c @@ -1172,7 +1172,7 @@ void gl4es_scratch_vertex(int alloc) { LOAD_GLES(glBufferData); LOAD_GLES(glGenBuffers); if(!glstate->scratch_vertex) { - glGenBuffers(1, &glstate->scratch_vertex); + gles_glGenBuffers(1, &glstate->scratch_vertex); } if(glstate->scratch_vertex_size < alloc) { #ifdef AMIGAOS4 @@ -1196,7 +1196,7 @@ void gl4es_scratch_indices(int alloc) { LOAD_GLES(glBufferData); LOAD_GLES(glGenBuffers); if(!glstate->scratch_indices) { - glGenBuffers(1, &glstate->scratch_indices); + gles_glGenBuffers(1, &glstate->scratch_indices); } bindBuffer(GL_ELEMENT_ARRAY_BUFFER, glstate->scratch_indices); if(glstate->scratch_indices_size < alloc) { From b1fd9a7742f3986628274dd1adc7a8ef47bdd31a Mon Sep 17 00:00:00 2001 From: Duy Tran Khanh <40482367+khanhduytran0@users.noreply.github.com> Date: Mon, 6 Mar 2023 22:04:02 +0700 Subject: [PATCH 2/2] also fix glGenBuffers call for amigaos --- src/gl/gl4es.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gl/gl4es.c b/src/gl/gl4es.c index e7c294b4f..06fee21b6 100644 --- a/src/gl/gl4es.c +++ b/src/gl/gl4es.c @@ -1178,7 +1178,7 @@ void gl4es_scratch_vertex(int alloc) { #ifdef AMIGAOS4 LOAD_GLES(glDeleteBuffers); GLuint old_buffer = glstate->scratch_vertex; - glGenBuffers(1, &glstate->scratch_vertex); + gles_glGenBuffers(1, &glstate->scratch_vertex); gles_glDeleteBuffers(1, &old_buffer); #endif bindBuffer(GL_ARRAY_BUFFER, glstate->scratch_vertex);