mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 10:50:10 +00:00
gsk: Use vertex arrays when we can
Use the new has_vertex_arrays api to determine whether we can use vertex arrays in GL.` Fixes: #6173
This commit is contained in:
parent
b8ffceaebb
commit
000c876953
@ -1070,7 +1070,7 @@ gsk_gl_command_queue_execute (GskGLCommandQueue *self,
|
||||
glBlendFunc (GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
|
||||
glBlendEquation (GL_FUNC_ADD);
|
||||
|
||||
if (!gdk_gl_context_get_use_es (self->context))
|
||||
if (gdk_gl_context_has_vertex_arrays (self->context))
|
||||
{
|
||||
glGenVertexArrays (1, &vao_id);
|
||||
glBindVertexArray (vao_id);
|
||||
@ -1257,7 +1257,7 @@ gsk_gl_command_queue_execute (GskGLCommandQueue *self,
|
||||
}
|
||||
|
||||
glDeleteBuffers (1, &vbo_id);
|
||||
if (!gdk_gl_context_get_use_es (self->context))
|
||||
if (gdk_gl_context_has_vertex_arrays (self->context))
|
||||
glDeleteVertexArrays (1, &vao_id);
|
||||
|
||||
gdk_profiler_set_int_counter (self->metrics.n_binds, n_binds);
|
||||
|
Loading…
Reference in New Issue
Block a user