[cogl/wip/outputs: 66/71] kms: set EGL_PLATFORM environment variable
- From: Robert Bragg <rbragg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl/wip/outputs: 66/71] kms: set EGL_PLATFORM environment variable
- Date: Fri, 27 Sep 2013 13:43:43 +0000 (UTC)
commit 454c6d66a443feb2895d4e634c80a02976f68db0
Author: Robert Bragg <robert linux intel com>
Date: Sat Jun 15 21:46:44 2013 +0100
kms: set EGL_PLATFORM environment variable
Although EGL doesn't currently have a standard way of supporting
multiple platforms and being able explicitly select a platform, Mesa at
least lets you explicitly select a platform via the EGL_PLATFORM
environment variable. This makes the egl-kms winsys set EGL_PLATFORM to
"gbm".
cogl/winsys/cogl-winsys-egl-kms.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/cogl/winsys/cogl-winsys-egl-kms.c b/cogl/winsys/cogl-winsys-egl-kms.c
index 02d3f8a..ddd5429 100644
--- a/cogl/winsys/cogl-winsys-egl-kms.c
+++ b/cogl/winsys/cogl-winsys-egl-kms.c
@@ -516,6 +516,12 @@ _cogl_winsys_renderer_connect (CoglRenderer *renderer,
goto error;
}
+ /* The EGL API doesn't provide for a way to explicitly select a
+ * platform when the driver can support multiple. Mesa allows
+ * selection using an environment variable though so that's what
+ * we're doing here... */
+ g_setenv ("EGL_PLATFORM", "gbm", 1);
+
egl_renderer->edpy = eglGetDisplay ((EGLNativeDisplayType)kms_renderer->gbm);
if (egl_renderer->edpy == EGL_NO_DISPLAY)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]