diff --git a/ChangeLog b/ChangeLog index eaeea7143..349350368 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-05-28 Matthew Allum + + * clutter/clutter-stage.c: (clutter_stage_get_actor_at_pos): + Fix for GL/ES. Barring texture reads this means all clutter + functionality now works on GL/ES! (no doubt with a few yet to + be discovered bugs) + 2007-05-28 Matthew Allum * clutter/clutter-backend.c: diff --git a/clutter/clutter-stage.c b/clutter/clutter-stage.c index 87c3b8363..0adaf9824 100644 --- a/clutter/clutter-stage.c +++ b/clutter/clutter-stage.c @@ -764,7 +764,7 @@ clutter_stage_get_actor_at_pos (ClutterStage *stage, gint y) { ClutterMainContext *context; - guchar pixel[3]; + guchar pixel[4]; GLint viewport[4]; ClutterColor white = { 0xff, 0xff, 0xff, 0xff }; guint32 id; @@ -781,13 +781,13 @@ clutter_stage_get_actor_at_pos (ClutterStage *stage, clutter_actor_paint (CLUTTER_ACTOR (stage)); context->pick_mode = FALSE; - /* Calls should work under both GL and GLES + /* Calls should work under both GL and GLES, note GLES needs RGBA * * FIXME: of course we need to handle the case where the frame buffer isn't - * 24bpp, i.e 16bpp which could be the case with GLES. + * 24bpp, i.e 16bpp which could be the case with GLES ?. */ glGetIntegerv(GL_VIEWPORT, viewport); - glReadPixels(x, viewport[3] - y, 1, 1, GL_RGB, GL_UNSIGNED_BYTE, pixel); + glReadPixels(x, viewport[3] - y, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, pixel); /* printf("x: %i , y: %i %x:%x:%x\n", x, y, pixel[0], pixel[1], pixel[2]); */