From 2ad1906be6e37ef2f656d1ffb1ffd7437dccd177 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 23 Dec 2014 14:32:24 +0100 Subject: vo_opengl_cb: use VAOs even in OpenGL 2.1 Using them reduces state change, since now at least vo_opengl_cb has to setup/break the vertex array bindings on every frame if no VAOs are available. This reverts the VAO related change in commit f64665e7. --- video/out/gl_common.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'video') diff --git a/video/out/gl_common.c b/video/out/gl_common.c index cfae5cc39f..883ea652f3 100644 --- a/video/out/gl_common.c +++ b/video/out/gl_common.c @@ -259,13 +259,10 @@ static const struct gl_functions gl_functions[] = { { .ver_core = 300, .ver_es_core = 300, - .provides = MPGL_CAP_SRGB_TEX | MPGL_CAP_SRGB_FB | MPGL_CAP_VAO | - MPGL_CAP_3D_TEX | MPGL_CAP_1ST_CLASS_ARRAYS, + .provides = MPGL_CAP_SRGB_TEX | MPGL_CAP_SRGB_FB | MPGL_CAP_3D_TEX | + MPGL_CAP_1ST_CLASS_ARRAYS, .functions = (const struct gl_function[]) { - DEF_FN(BindVertexArray), - DEF_FN(DeleteVertexArrays), DEF_FN(GetStringi), - DEF_FN(GenVertexArrays), // for ES 3.0 DEF_FN(ReadBuffer), DEF_FN(UnmapBuffer), @@ -309,6 +306,19 @@ static const struct gl_functions gl_functions[] = { {0} }, }, + // VAOs, extension in GL 2.x, core in GL 3.x core. + { + .ver_core = 300, + .ver_es_core = 300, + .extension = "GL_ARB_vertex_array_object", + .provides = MPGL_CAP_VAO, + .functions = (const struct gl_function[]) { + DEF_FN(GenVertexArrays), + DEF_FN(BindVertexArray), + DEF_FN(DeleteVertexArrays), + {0} + } + }, // sRGB textures, extension in GL 2.x, core in GL 3.x core. { .ver_core = 300, -- cgit v1.2.3