2008-06-25 Matthew Allum <mallum@openedhand.com>

* clutter/eglnative/clutter-stage-egl.c:
        * clutter/eglx/clutter-stage-egl.c:
        Disable passing of attribs to eglCreateContext() on GLES 1.1 h/w
This commit is contained in:
Matthew Allum 2008-06-25 11:17:43 +00:00
parent ed44a845a5
commit b84c5311ee
3 changed files with 29 additions and 19 deletions

View File

@ -1,3 +1,9 @@
2008-06-25 Matthew Allum <mallum@openedhand.com>
* clutter/eglnative/clutter-stage-egl.c:
* clutter/eglx/clutter-stage-egl.c:
Disable passing of attribs to eglCreateContext() on GLES 1.1 h/w
2008-06-25 Neil Roberts <neil@o-hand.com> 2008-06-25 Neil Roberts <neil@o-hand.com>
* clutter/clutter-actor.c (clutter_actor_paint): Guard against the * clutter/clutter-actor.c (clutter_actor_paint): Guard against the

View File

@ -156,20 +156,21 @@ clutter_stage_egl_realize (ClutterActor *actor)
if (G_UNLIKELY (backend_egl->egl_context == NULL)) if (G_UNLIKELY (backend_egl->egl_context == NULL))
{ {
static const EGLint attribs[3]
= { EGL_CONTEXT_CLIENT_VERSION,
#ifdef HAVE_COGL_GLES2 #ifdef HAVE_COGL_GLES2
2, static const EGLint attribs[3]
#else /* HAVE_COGL_GLES2 */ = { EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE };
1,
#endif
EGL_NONE };
CLUTTER_NOTE (GL, "Creating EGL Context");
backend_egl->egl_context = eglCreateContext (backend_egl->edpy, backend_egl->egl_context = eglCreateContext (backend_egl->edpy,
configs[0], configs[0],
EGL_NO_CONTEXT, EGL_NO_CONTEXT,
attribs); attribs);
#else
/* Seems some GLES implementations 1.x do not like attribs... */
backend_egl->egl_context = eglCreateContext (backend_egl->edpy,
configs[0],
EGL_NO_CONTEXT,
NULL);
#endif
if (backend_egl->egl_context == EGL_NO_CONTEXT) if (backend_egl->egl_context == EGL_NO_CONTEXT)
{ {
@ -178,6 +179,8 @@ clutter_stage_egl_realize (ClutterActor *actor)
CLUTTER_ACTOR_UNSET_FLAGS (actor, CLUTTER_ACTOR_REALIZED); CLUTTER_ACTOR_UNSET_FLAGS (actor, CLUTTER_ACTOR_REALIZED);
return; return;
} }
CLUTTER_NOTE (GL, "Created EGL Context");
} }
CLUTTER_NOTE (BACKEND, "Marking stage as realized and setting context"); CLUTTER_NOTE (BACKEND, "Marking stage as realized and setting context");

View File

@ -223,27 +223,28 @@ clutter_stage_egl_realize (ClutterActor *actor)
if (G_UNLIKELY (backend_egl->egl_context == None)) if (G_UNLIKELY (backend_egl->egl_context == None))
{ {
static const EGLint attribs[3]
= { EGL_CONTEXT_CLIENT_VERSION,
#ifdef HAVE_COGL_GLES2 #ifdef HAVE_COGL_GLES2
2, static const EGLint attribs[3]
#else /* HAVE_COGL_GLES2 */ = { EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE };
1,
#endif
EGL_NONE };
CLUTTER_NOTE (GL, "Creating EGL Context");
backend_egl->egl_context = eglCreateContext (backend_egl->edpy, backend_egl->egl_context = eglCreateContext (backend_egl->edpy,
configs[0], configs[0],
EGL_NO_CONTEXT, EGL_NO_CONTEXT,
attribs); attribs);
#else
/* Seems some GLES implementations 1.x do not like attribs... */
backend_egl->egl_context = eglCreateContext (backend_egl->edpy,
configs[0],
EGL_NO_CONTEXT,
NULL);
#endif
if (backend_egl->egl_context == EGL_NO_CONTEXT) if (backend_egl->egl_context == EGL_NO_CONTEXT)
{ {
g_critical ("Unable to create a suitable EGL context"); g_critical ("Unable to create a suitable EGL context");
goto fail; goto fail;
} }
CLUTTER_NOTE (GL, "Created EGL Context");
} }
CLUTTER_ACTOR_SET_FLAGS (actor, CLUTTER_ACTOR_REALIZED); CLUTTER_ACTOR_SET_FLAGS (actor, CLUTTER_ACTOR_REALIZED);