Question

I am using glReadPixels to read the pixels from FBO to memory.

Here is the code:

UINT8* data;
glBindFramebuffer(GL_FRAMEBUFFER, FBOID);
glReadPixels(0, 0, w, h, GL_RGB, GL_UNSIGNED_BYTE, data);

I found this operation is very very slow... Is there any alternative in openGL ES2.0(Android)?

Was it helpful?

Solution

Yes, it's quite slow. OpenGL ES 2.0 doesn't provide a faster way on Android. You could use PBOs on OpenGL ES 3.0 but that may not be an option for you, since very few devices support that at the moment and it requires Android 4.3.

EDIT: I do know that some devices have serious performance issues uploading RGB textures, maybe it happens in the opposite direction too. Try using RGBA format instead.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top