summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/egl_helpers.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-12-30 19:24:34 +0100
committerwm4 <wm4@nowhere>2016-12-30 20:03:17 +0100
commitd4e7b981bfcdcd7c6930af73494529d11b8bcde9 (patch)
tree2a89c7eb9660502396d9d2fc28fbac8911c868a1 /video/out/opengl/egl_helpers.h
parentb9cebf180b6d0b429dccbffb60243a88b600aca1 (diff)
downloadmpv-d4e7b981bfcdcd7c6930af73494529d11b8bcde9.tar.bz2
mpv-d4e7b981bfcdcd7c6930af73494529d11b8bcde9.tar.xz
vo_opengl: egl_helpers: add a way to pass more options
For X11 garbage we have to pass some annoying parameters to EGL context creation. Add some sort of extensible API, so that adding a new parameter doesn't break all callers. We still want to keep it as a single function, because it's so nice isolating all the EGL nonsense API boilerplate like this. (Did I mention yet that X11 and EGL are garbage?) Also somewhat simplifies the vo_flags mess in the helper internals.
Diffstat (limited to 'video/out/opengl/egl_helpers.h')
-rw-r--r--video/out/opengl/egl_helpers.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/video/out/opengl/egl_helpers.h b/video/out/opengl/egl_helpers.h
index 04197493f3..15033834f4 100644
--- a/video/out/opengl/egl_helpers.h
+++ b/video/out/opengl/egl_helpers.h
@@ -11,4 +11,13 @@ struct mp_log;
bool mpegl_create_context(EGLDisplay display, struct mp_log *log, int vo_flags,
EGLContext *out_context, EGLConfig *out_config);
+struct mpegl_opts {
+ // combination of VOFLAG_* values.
+ int vo_flags;
+};
+
+bool mpegl_create_context_opts(EGLDisplay display, struct mp_log *log,
+ struct mpegl_opts *opts,
+ EGLContext *out_context, EGLConfig *out_config);
+
#endif