summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--video/out/opengl/context.c10
-rw-r--r--video/out/opengl/context.h2
-rw-r--r--video/out/opengl/context_glx.c4
-rw-r--r--video/out/opengl/egl_helpers.c4
4 files changed, 7 insertions, 13 deletions
diff --git a/video/out/opengl/context.c b/video/out/opengl/context.c
index c491039b66..c9f8445246 100644
--- a/video/out/opengl/context.c
+++ b/video/out/opengl/context.c
@@ -21,15 +21,9 @@
#include "utils.h"
// 0-terminated list of desktop GL versions a backend should try to
-// initialize. The first entry is the most preferred version.
-const int mpgl_preferred_gl_versions[] = {
- 440,
- 430,
- 400,
- 330,
+// initialize. Each entry is the minimum required version.
+const int mpgl_min_required_gl_versions[] = {
320,
- 310,
- 300,
210,
0
};
diff --git a/video/out/opengl/context.h b/video/out/opengl/context.h
index 2dd2517ef5..d78d17094c 100644
--- a/video/out/opengl/context.h
+++ b/video/out/opengl/context.h
@@ -4,7 +4,7 @@
#include "video/out/gpu/context.h"
#include "common.h"
-extern const int mpgl_preferred_gl_versions[];
+extern const int mpgl_min_required_gl_versions[];
// Returns whether or not a candidate GL version should be accepted or not
// (based on the --opengl opts). Implementations may call this before
diff --git a/video/out/opengl/context_glx.c b/video/out/opengl/context_glx.c
index 4d9d993121..ee1fb30abf 100644
--- a/video/out/opengl/context_glx.c
+++ b/video/out/opengl/context_glx.c
@@ -312,8 +312,8 @@ static bool glx_init(struct ra_ctx *ctx)
goto uninit;
bool success = false;
- for (int n = 0; mpgl_preferred_gl_versions[n]; n++) {
- int version = mpgl_preferred_gl_versions[n];
+ for (int n = 0; mpgl_min_required_gl_versions[n]; n++) {
+ int version = mpgl_min_required_gl_versions[n];
MP_VERBOSE(ctx, "Creating OpenGL %d.%d context...\n",
MPGL_VER_P(version));
if (version >= 300) {
diff --git a/video/out/opengl/egl_helpers.c b/video/out/opengl/egl_helpers.c
index bcd85bfb73..2bdf3df0f2 100644
--- a/video/out/opengl/egl_helpers.c
+++ b/video/out/opengl/egl_helpers.c
@@ -184,8 +184,8 @@ static bool create_context(struct ra_ctx *ctx, EGLDisplay display,
egl_ctx = eglCreateContext(display, config, EGL_NO_CONTEXT, attrs);
} else {
- for (int n = 0; mpgl_preferred_gl_versions[n]; n++) {
- int ver = mpgl_preferred_gl_versions[n];
+ for (int n = 0; mpgl_min_required_gl_versions[n]; n++) {
+ int ver = mpgl_min_required_gl_versions[n];
if (!ra_gl_ctx_test_version(ctx, ver, false))
continue;