mirror of
https://github.com/brl/mutter.git
synced 2024-12-22 19:12:04 +00:00
2007-05-28 Matthew Allum <mallum@openedhand.com>
* 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)
This commit is contained in:
parent
a2bd6de736
commit
71c2f16bef
@ -1,3 +1,10 @@
|
||||
2007-05-28 Matthew Allum <mallum@openedhand.com>
|
||||
|
||||
* 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 <mallum@openedhand.com>
|
||||
|
||||
* clutter/clutter-backend.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]); */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user