2015-12-19 11:45:07 +00:00
|
|
|
#ifndef MP_GL_EGL_HELPERS_H
|
|
|
|
#define MP_GL_EGL_HELPERS_H
|
|
|
|
|
2016-09-13 13:38:51 +00:00
|
|
|
#include <stdbool.h>
|
|
|
|
|
2015-12-19 11:45:07 +00:00
|
|
|
#include <EGL/egl.h>
|
|
|
|
#include <EGL/eglext.h>
|
|
|
|
|
2016-09-13 13:38:51 +00:00
|
|
|
struct mp_log;
|
|
|
|
|
|
|
|
bool mpegl_create_context(EGLDisplay display, struct mp_log *log, int vo_flags,
|
|
|
|
EGLContext *out_context, EGLConfig *out_config);
|
|
|
|
|
2016-12-30 18:24:34 +00:00
|
|
|
struct mpegl_opts {
|
|
|
|
// combination of VOFLAG_* values.
|
|
|
|
int vo_flags;
|
2016-12-30 18:52:47 +00:00
|
|
|
|
|
|
|
// 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);
|
2016-12-30 18:24:34 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
bool mpegl_create_context_opts(EGLDisplay display, struct mp_log *log,
|
|
|
|
struct mpegl_opts *opts,
|
|
|
|
EGLContext *out_context, EGLConfig *out_config);
|
|
|
|
|
2017-04-06 12:50:19 +00:00
|
|
|
struct GL;
|
|
|
|
void mpegl_load_functions(struct GL *gl, struct mp_log *log);
|
|
|
|
|
2015-12-19 11:45:07 +00:00
|
|
|
#endif
|