According to OpenGL ES spec:

Only two combinations of format and type are accepted.
The first is format RGBA and type UNSIGNED BYTE. The second is an
implementation-chosen format. The values of format and type for this
format may be determined by calling GetIntegerv
with the symbolic constants IMPLEMENTATION COLOR READ FORMAT OES and
IMPLEMENTATION COLOR READ TYPE OES, respectively.

The second supported format for emulator and G1 is GL_RGB,
GL_UNSIGNED_SHORT_5_6_5.
And make sure you specify correct dimensions.

On 23 дек, 19:04, yog <[email protected]> wrote:
> Hi all,
>
> Iam trying to read glReadpixel API to get frame buffers, when printed
> buffer in API Iam getting  all 0's in my Emulator. Iam a new-bie to
> android and open-gl. can any one  help me why this is happening? Iam
> using Android 2.0. Is there any opensource android APP using
> glReadPixel function.
>
> GLES10.glReadPixels(x, y, screenWidth, screenHeight,GLES10.GL_RGB,
> GLES10.GL_UNSIGNED_BYTE, pixel);
>                                  0  0         320                 480
> Thanks in advance,
> Yog.

-- 
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