diff options
author | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2015-02-17 10:52:58 +0100 |
---|---|---|
committer | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2015-07-20 09:53:14 +0200 |
commit | 80487655b55cd1b2034f656a63f77493f71ef5c0 (patch) | |
tree | 5efc2dbdcbe2c08ddf1a53ad43495e4a2e2f3a24 | |
parent | 5f333f63a36a8aac6994bd46476a2a9112124a77 (diff) |
opengl demo: force wayland instead of letting EGL decidetransparency-wayland
-rw-r--r-- | src/egl/opengl/Makefile.am | 4 | ||||
-rw-r--r-- | src/egl/opengl/demo1.c | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/egl/opengl/Makefile.am b/src/egl/opengl/Makefile.am index 0c7228fa..e0c6c829 100644 --- a/src/egl/opengl/Makefile.am +++ b/src/egl/opengl/Makefile.am @@ -28,11 +28,13 @@ AM_CFLAGS = \ $(DEMO_CFLAGS) \ $(EGL_CFLAGS) \ + $(WAYLAND_CFLAGS) \ -I$(top_srcdir)/src/egl/eglut \ -I$(top_srcdir)/src/util AM_LDFLAGS = \ $(DEMO_LIBS) \ - $(EGL_LIBS) + $(EGL_LIBS) \ + $(WAYLAND_LIBS) if HAVE_X11 EGL_X11_DEMOS = \ diff --git a/src/egl/opengl/demo1.c b/src/egl/opengl/demo1.c index 8a6d43d1..c4ada380 100644 --- a/src/egl/opengl/demo1.c +++ b/src/egl/opengl/demo1.c @@ -11,6 +11,7 @@ #include <stdlib.h> #include <string.h> +#include <wayland-client.h> /** * Test EGL_MESA_screen_surface functions @@ -109,7 +110,10 @@ main(int argc, char *argv[]) EGL_NONE }; - EGLDisplay d = eglGetDisplay(EGL_DEFAULT_DISPLAY); + struct wl_display *display = wl_display_connect(NULL); + + EGLDisplay d = eglGetPlatformDisplayEXT(EGL_PLATFORM_WAYLAND_EXT, + display, NULL); assert(d); if (!eglInitialize(d, &maj, &min)) { |