diff options
author | wm4 <wm4@nowhere> | 2016-12-30 19:52:47 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-12-30 20:03:50 +0100 |
commit | 7033a4334bcf457b0cadaca7f4b0ce8099469632 (patch) | |
tree | 7092e9d4a4b690b1032f596863a5049ee8fcc267 /video/out/opengl/egl_helpers.h | |
parent | d4e7b981bfcdcd7c6930af73494529d11b8bcde9 (diff) | |
download | mpv-7033a4334bcf457b0cadaca7f4b0ce8099469632.tar.bz2 mpv-7033a4334bcf457b0cadaca7f4b0ce8099469632.tar.xz |
vo_opengl: egl_helpers: add a way to override config selection
Preparation for the following commits. Since at least theoretically the
config selection depends on the context type (EGL_RENDERABLE_TYPE has
separate bits for ES 2, ES 3, and desktop GL), doing it any other way
would be too painful.
Diffstat (limited to 'video/out/opengl/egl_helpers.h')
-rw-r--r-- | video/out/opengl/egl_helpers.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/video/out/opengl/egl_helpers.h b/video/out/opengl/egl_helpers.h index 15033834f4..ea751d4c5e 100644 --- a/video/out/opengl/egl_helpers.h +++ b/video/out/opengl/egl_helpers.h @@ -14,6 +14,13 @@ bool mpegl_create_context(EGLDisplay display, struct mp_log *log, int vo_flags, struct mpegl_opts { // combination of VOFLAG_* values. int vo_flags; + + // for callbacks + void *user_data; + + // if set, pick the desired config from the given list and return its index + // defaults to 0 (they are sorted by eglChooseConfig) + int (*refine_config)(void *user_data, EGLConfig *configs, int num_configs); }; bool mpegl_create_context_opts(EGLDisplay display, struct mp_log *log, |