egl: Add eglBindAPI helper

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1828>
This commit is contained in:
Jonas Ådahl 2021-04-13 15:43:35 +02:00
parent 5e45dc15b6
commit 3c47661b78
2 changed files with 18 additions and 0 deletions

View File

@ -249,6 +249,20 @@ meta_egl_initialize (MetaEgl *egl,
return TRUE;
}
gboolean
meta_egl_bind_api (MetaEgl *egl,
EGLenum api,
GError **error)
{
if (!eglBindAPI (api))
{
set_egl_error (error);
return FALSE;
}
return TRUE;
}
gpointer
meta_egl_get_proc_address (MetaEgl *egl,
const char *procname,

View File

@ -54,6 +54,10 @@ gboolean meta_egl_initialize (MetaEgl *egl,
EGLDisplay display,
GError **error);
gboolean meta_egl_bind_api (MetaEgl *egl,
EGLenum api,
GError **error);
gpointer meta_egl_get_proc_address (MetaEgl *egl,
const char *procname,
GError **error);