ext Matthew Allum wrote:
>
>
> Every actor has a unique ID which during this translation is converted
> into a color value and each actor (offscreen) paints a silhouette of
> itself in this color. The pixel at the requested pos is then read from
> the framebuffer and its color then mapped back to the target actor.
> See _clutter_do_pick in clutter-main.c . It probably worth adding some
> debug stuff to that function to see what color is being read back and
> maybe even dumping a full readpixels of the framebuffer to disk to check
> exactly what is getting painted. 
>   
I put some debug there:

 /* Calls should work under both GL and GLES, note GLES needs RGBA */
  glGetIntegerv(GL_VIEWPORT, viewport);
  glReadPixels(x, viewport[3] - y, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, pixel);

  printf("_clutter_do_pick(%3d,%3d,%3d) vp[%3d,%3d,%3d,%3d] 
pixel[%02x,%02x,%02x]\n",
     x,y,viewport[3]-y,
     viewport[0],viewport[1],viewport[2],viewport[3],
     pixel[0],pixel[1],pixel[2]);

And il looks alike there in some problem geting right pixel value
_clutter_do_pick(162, 86,394) vp[  0,  0,640,480]  pixel[20,56,01]
_clutter_do_pick(162, 86)  id=000022b0
[stage] MOTION *source*
_clutter_do_pick(298, 85,395) vp[  0,  0,640,480]  pixel[20,56,01]
_clutter_do_pick(298, 85)  id=000022b0

_clutter_do_pick(293, 83,397) vp[  0,  0,640,480]  pixel[20,56,01]
_clutter_do_pick(293, 83)  id=000022b0
[stage] MOTION *source*
_clutter_do_pick(458, 86,394) vp[  0,  0,640,480]  pixel[20,56,01]
_clutter_do_pick(458, 86)  id=000022b0

_clutter_do_pick(453, 82,398) vp[  0,  0,640,480]  pixel[20,56,01]
_clutter_do_pick(453, 82)  id=000022b0
[stage] MOTION *source*
_clutter_do_pick(367,166,314) vp[  0,  0,640,480]  pixel[20,56,01]
_clutter_do_pick(367,166)  id=000022b0

_clutter_do_pick(365,166,314) vp[  0,  0,640,480]  pixel[20,56,01]
_clutter_do_pick(365,166)  id=000022b0

It aalways picks some garbage in pixel values. In this trace
i hit red, green, blue and then white background.

It looks that it may be bug in eglx library of screen drawable rendering ?

Kate



-- 
To unsubscribe send a mail to [EMAIL PROTECTED]

Reply via email to