From c1a27d481ba7579a59b720a6b9b7a4be46294110 Mon Sep 17 00:00:00 2001 From: nobled Date: Tue, 8 Feb 2011 15:53:08 +0000 Subject: [PATCH] wayland: set renderable type on dummy surface Make sure it's compatible with the API that's in use. --- clutter/wayland/clutter-backend-wayland.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/clutter/wayland/clutter-backend-wayland.c b/clutter/wayland/clutter-backend-wayland.c index c96a24597..794cecad2 100644 --- a/clutter/wayland/clutter-backend-wayland.c +++ b/clutter/wayland/clutter-backend-wayland.c @@ -337,12 +337,23 @@ clutter_backend_wayland_post_parse (ClutterBackend *backend, return TRUE; } +#if defined(HAVE_COGL_GL) +#define _COGL_RENDERABLE_BIT EGL_OPENGL_BIT +#elif defined(HAVE_COGL_GLES2) +#define _COGL_GLES_VERSION 2 +#define _COGL_RENDERABLE_BIT EGL_OPENGL_ES2_BIT +#elif defined(HAVE_COGL_GLES) +#define _COGL_GLES_VERSION 1 +#define _COGL_RENDERABLE_BIT EGL_OPENGL_ES_BIT +#endif + static gboolean make_dummy_surface (ClutterBackendWayland *backend_wayland) { static const EGLint attrs[] = { EGL_WIDTH, 1, EGL_HEIGHT, 1, + EGL_RENDERABLE_TYPE, _COGL_RENDERABLE_BIT, EGL_NONE }; EGLint num_configs; @@ -362,12 +373,6 @@ make_dummy_surface (ClutterBackendWayland *backend_wayland) return TRUE; } -#if defined(HAVE_COGL_GLES2) -#define _COGL_GLES_VERSION 2 -#elif defined(HAVE_COGL_GLES) -#define _COGL_GLES_VERSION 1 -#endif - static gboolean try_create_context (ClutterBackend *backend, int retry_cookie,