diff --git a/ChangeLog b/ChangeLog index 7afd35ec9..ee9728860 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-06-23 Robert Bragg + + * clutter/eglx/clutter-stage-egl.c: Makes sure the eglx backend + passes the EGL_OPENGL_ES2_BIT surface attrib when using + GLES2.0 under cogl + 2008-06-23 Chris Lord * clutter/x11/clutter-event-x11.c: (convert_xdevicekey_to_xkey), diff --git a/clutter/eglx/clutter-stage-egl.c b/clutter/eglx/clutter-stage-egl.c index bf68fc7ed..75ebc7e68 100644 --- a/clutter/eglx/clutter-stage-egl.c +++ b/clutter/eglx/clutter-stage-egl.c @@ -100,6 +100,13 @@ clutter_stage_egl_realize (ClutterActor *actor) EGL_RED_SIZE, 5, EGL_GREEN_SIZE, 6, EGL_BLUE_SIZE, 5, + +#ifdef HAVE_COGL_GLES2 + EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, +#else /* HAVE_COGL_GLES2 */ + EGL_SURFACE_TYPE, EGL_WINDOW_BIT, +#endif /* HAVE_COGL_GLES2 */ + EGL_NONE }; @@ -216,12 +223,21 @@ clutter_stage_egl_realize (ClutterActor *actor) if (G_UNLIKELY (backend_egl->egl_context == None)) { + static const EGLint attribs[3] + = { EGL_CONTEXT_CLIENT_VERSION, +#ifdef HAVE_COGL_GLES2 + 2, +#else /* HAVE_COGL_GLES2 */ + 1, +#endif + EGL_NONE }; + CLUTTER_NOTE (GL, "Creating EGL Context"); backend_egl->egl_context = eglCreateContext (backend_egl->edpy, configs[0], EGL_NO_CONTEXT, - NULL); + attribs); if (backend_egl->egl_context == EGL_NO_CONTEXT) {