From: Benjamin Otte Date: Sat, 15 Apr 2023 15:50:18 +0000 (+0200) Subject: gles: Don't use vertex array objects X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~4^2~10^2~15 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=8b8f493bbab756151b2936ad5eb4ee2b7839cd02;p=gtk4.git gles: Don't use vertex array objects They're not needed and GLES doesn't technically support them, even though GTK had been using them via epoxy sneakily using the GL_OES_vertex_array_object extension behind our back. --- diff --git a/gsk/gl/gskglcommandqueue.c b/gsk/gl/gskglcommandqueue.c index 8fee49fd15..a8624642f0 100644 --- a/gsk/gl/gskglcommandqueue.c +++ b/gsk/gl/gskglcommandqueue.c @@ -1002,8 +1002,11 @@ gsk_gl_command_queue_execute (GskGLCommandQueue *self, glBlendFunc (GL_ONE, GL_ONE_MINUS_SRC_ALPHA); glBlendEquation (GL_FUNC_ADD); - glGenVertexArrays (1, &vao_id); - glBindVertexArray (vao_id); + if (!gdk_gl_context_get_use_es (self->context)) + { + glGenVertexArrays (1, &vao_id); + glBindVertexArray (vao_id); + } vbo_id = gsk_gl_buffer_submit (&self->vertices); @@ -1159,7 +1162,8 @@ gsk_gl_command_queue_execute (GskGLCommandQueue *self, } glDeleteBuffers (1, &vbo_id); - glDeleteVertexArrays (1, &vao_id); + if (!gdk_gl_context_get_use_es (self->context)) + glDeleteVertexArrays (1, &vao_id); gdk_profiler_set_int_counter (self->metrics.n_binds, n_binds); gdk_profiler_set_int_counter (self->metrics.n_uniforms, n_uniforms);