diff --git a/src/backends/meta-egl.c b/src/backends/meta-egl.c index 3e3a56734..fac21f378 100644 --- a/src/backends/meta-egl.c +++ b/src/backends/meta-egl.c @@ -246,6 +246,25 @@ meta_egl_initialize (MetaEgl *egl, return TRUE; } +gpointer +meta_egl_get_proc_address (MetaEgl *egl, + const char *procname, + GError **error) +{ + gpointer func; + + func = (gpointer) eglGetProcAddress (procname); + if (!func) + { + g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, + "Could not load symbol '%s': Not found", + procname); + return NULL; + } + + return func; +} + gboolean meta_egl_choose_config (MetaEgl *egl, EGLDisplay display, diff --git a/src/backends/meta-egl.h b/src/backends/meta-egl.h index fea5e0059..1bde6fac8 100644 --- a/src/backends/meta-egl.h +++ b/src/backends/meta-egl.h @@ -52,6 +52,10 @@ gboolean meta_egl_initialize (MetaEgl *egl, EGLDisplay display, GError **error); +gpointer meta_egl_get_proc_address (MetaEgl *egl, + const char *procname, + GError **error); + gboolean meta_egl_choose_config (MetaEgl *egl, EGLDisplay display, const EGLint *attrib_list,