I have an OpenGL-ES app, where i want to copy data from window surface to native pixmap surface at a certain time, i.e. i want to copy the content whatever is being shown on the display at a given time to a pixmap surface.And later, i want to copy that data back to the window surface.
I know for copying data from window surface to native pixmap, i can use eglCopyBuffers(). But i am not sure how i can copy the data back from native pixmap to window surface. I know there are APIs like glCopyPixels/glDrawPixels but read somewhere that these copypixel operations are somewhat slower. Alternatively i think using textures, we can do this, but i do not have much detailed idea on this.
So, can any one please suggest me what would be the best way to achieve this?