I am using glReadPixels
to take a snapshot at regular intervals in drawFrame
method of GLSurfaceView.Renderer
. I need to take this snapshot at regular intervals to keep saving my data as per my app requirements.
However glReadPixels
performance is really slow and shows a lag. Here's how I use the method:
gl.glReadPixels(0, 0, 1280, 752, GL10.GL_RGBA,GL10.GL_UNSIGNED_BYTE, bb);
Is there a alternative to use glReadPixels
? How can I save the image without causing a lag?