egl: Add eglInitialize helper

https://bugzilla.gnome.org/show_bug.cgi?id=773629
This commit is contained in:
Jonas Ådahl 2016-09-29 22:26:24 +08:00
parent cb6adc45d1
commit 78c121eb10
2 changed files with 18 additions and 0 deletions

View File

@ -184,6 +184,20 @@ meta_egl_has_extensions (MetaEgl *egl,
return has_extensions;
}
gboolean
meta_egl_initialize (MetaEgl *egl,
EGLDisplay display,
GError **error)
{
if (!eglInitialize (display, NULL, NULL))
{
set_egl_error (error);
return FALSE;
}
return TRUE;
}
gboolean
meta_egl_choose_config (MetaEgl *egl,
EGLDisplay display,

View File

@ -38,6 +38,10 @@ gboolean meta_egl_has_extensions (MetaEgl *egl,
char *first_extension,
...);
gboolean meta_egl_initialize (MetaEgl *egl,
EGLDisplay display,
GError **error);
gboolean meta_egl_choose_config (MetaEgl *egl,
EGLDisplay display,
const EGLint *attrib_list,