2008-06-23 Robert Bragg <bob@o-hand.com>

* 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
This commit is contained in:
Robert Bragg 2008-06-23 13:09:08 +00:00
parent 6ba7710224
commit 030ac047d1
2 changed files with 23 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2008-06-23 Robert Bragg <bob@o-hand.com>
* 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 <chris@openedhand.com>
* clutter/x11/clutter-event-x11.c: (convert_xdevicekey_to_xkey),

View File

@ -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)
{