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.
This commit is contained in:
wm4 2014-12-23 14:32:24 +01:00
parent a71601231e
commit 2ad1906be6
1 changed files with 15 additions and 5 deletions

View File

@ -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,