BaoXu,

There is a conversion that needs to be made when calling glReadPixels
().  OpenGL uses unsigned bytes, and Java uses signed bytes.  To
convert, cast the byte to an int.  If the value is negative, then add
256.

In your particular example, a returned alpha value of -1, cast to an
int, +256, results in a value of 255.  This is full alpha.

Cheers,

Steve

On Aug 2, 8:35 pm, BaoXu Jiang <[email protected]> wrote:
> Hi,
>
> it is always return -1 when call Android opengl es apiglReadPixels(),
> it is a bug of Android?
>
> Thanks,

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to