diff options
author | wm4 <wm4@nowhere> | 2014-12-23 14:32:24 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-12-23 14:32:24 +0100 |
commit | 2ad1906be6e37ef2f656d1ffb1ffd7437dccd177 (patch) | |
tree | 1496deb1c746fbb6b68aee2947e197919426e7f3 | |
parent | a71601231e43b588981081390225565b6a289177 (diff) | |
download | mpv-2ad1906be6e37ef2f656d1ffb1ffd7437dccd177.tar.bz2 mpv-2ad1906be6e37ef2f656d1ffb1ffd7437dccd177.tar.xz |
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.
-rw-r--r-- | video/out/gl_common.c | 20 |
1 files changed, 15 insertions, 5 deletions
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, |