I have a problem about Android get color data from textureID
I hope use openGLES to got real pixels data and modify it
This is my code and in the Gallerydata. All of bytes are zero, but glgetError is 0.
I don't know why. Is Any genius man can help me?
byte[] Galleydata = new byte[GalleyWidth*GalleyHeight*4];
ByteBuffer buffer = ByteBuffer.wrap(Galleydata);
GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, texturePtr);
GLES20.glReadPixels(0,0,GalleyWidth,GalleyHeight,GLES20.GL_RGBA,GLES20.GL_UNSIGNED_BYTE,buffer);
buffer.get(Galleydata);