Skip to content

Commit

Permalink
Merge pull request #418 from khanhduytran0/patch-2
Browse files Browse the repository at this point in the history
Fix glGenBuffers usage in gl4es_scratch_*
  • Loading branch information
ptitSeb authored Mar 6, 2023
2 parents c156cc6 + b1fd9a7 commit b3034e6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/gl/gl4es.c
Original file line number Diff line number Diff line change
Expand Up @@ -1172,13 +1172,13 @@ 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
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);
Expand All @@ -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) {
Expand Down

0 comments on commit b3034e6

Please sign in to comment.