[mutter] egl: Expose eglGetProcAddress
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] egl: Expose eglGetProcAddress
- Date: Fri, 6 Oct 2017 18:25:41 +0000 (UTC)
commit e62cfd90437e9d6dd5a1ca4c52264fce94285df4
Author: Jonas Ådahl <jadahl gmail com>
Date: Mon Jul 24 17:15:21 2017 +0800
egl: Expose eglGetProcAddress
It will be needed for OpenGL ES extension function symbol loading.
https://bugzilla.gnome.org/show_bug.cgi?id=785381
src/backends/meta-egl.c | 19 +++++++++++++++++++
src/backends/meta-egl.h | 4 ++++
2 files changed, 23 insertions(+), 0 deletions(-)
---
diff --git a/src/backends/meta-egl.c b/src/backends/meta-egl.c
index 3e3a567..fac21f3 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 fea5e00..1bde6fa 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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]