I saw
format specifies the format of the returned pixel values; accepted values are:
GL_ALPHA GL_RGB GL_RGBA RGBA color components are read from the color buffer. Each color component is converted to floating point such that zero intensity maps to 0.0 and full intensity maps to 1.0.
Unneeded data is then discarded. For example, GL_ALPHA discards the red, green, and blue components, while GL_RGB discards only the alpha component. GL_LUMINANCE computes a single-component value as the sum of the red, green, and blue components, and GL_LUMINANCE_ALPHA does the same, while keeping alpha as a second value. The final values are clamped to the range [0, 1]."
at https://www.khronos.org/opengles/sdk/1.1/docs/man/glReadPixels.xml
It's work well if use GL_RGBA. But if I change
glReadPixelsPBOJNI(0, 0, width, height, GLES30.GL_RGBA, GLES30.GL_UNSIGNED_BYTE, 0);
to
glReadPixelsPBOJNI(0, 0, width, height, GLES30.GL_RGB, GLES30.GL_UNSIGNED_BYTE, 0);
0x502 is got. What's wrong with this?
My code is here: https://stackoverflow.com/questions/34347835/how-can-i-implement-pbopixel-buffer-object-in-android-grafika-project