mirror of
https://github.com/mpv-player/mpv.git
synced 2026-06-06 20:10:30 +00:00
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:
+15
-5
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user