From: nobled Date: Sun, 30 Jan 2011 22:22:10 +0000 (+0000) Subject: wayland: check for API-specific surfaceless extension X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ffd7197dd6679e539b2ede0bdd401f57461113d5;p=profile%2Fivi%2Fclutter.git wayland: check for API-specific surfaceless extension It's a whole different extension name for each GL api. --- diff --git a/clutter/wayland/clutter-backend-wayland.c b/clutter/wayland/clutter-backend-wayland.c index 1ba958a..dd26b4a 100644 --- a/clutter/wayland/clutter-backend-wayland.c +++ b/clutter/wayland/clutter-backend-wayland.c @@ -341,6 +341,14 @@ fail: } } +#if defined(HAVE_COGL_GL) +#define _COGL_SURFACELESS_EXTENSION "EGL_KHR_surfaceless_opengl" +#elif defined(HAVE_COGL_GLES) +#define _COGL_SURFACELESS_EXTENSION "EGL_KHR_surfaceless_gles1" +#elif defined(HAVE_COGL_GLES2) +#define _COGL_SURFACELESS_EXTENSION "EGL_KHR_surfaceless_gles2" +#endif + static gboolean clutter_backend_wayland_create_context (ClutterBackend *backend, GError **error) @@ -357,12 +365,12 @@ clutter_backend_wayland_create_context (ClutterBackend *backend, egl_extensions = eglQueryString (backend_wayland->edpy, EGL_EXTENSIONS); - if (!_cogl_check_extension ("EGL_KHR_surfaceless_opengl", egl_extensions)) + if (!_cogl_check_extension (_COGL_SURFACELESS_EXTENSION, egl_extensions)) { g_set_error (error, CLUTTER_INIT_ERROR, CLUTTER_INIT_ERROR_BACKEND, "Wayland clients require the " - "EGL_KHR_surfaceless_opengl extension"); + _COGL_SURFACELESS_EXTENSION " extension"); return FALSE; }