Restoring a saved opengl ES buffer (i.e. writing it back to screen)
- by Adam
I'm writing an iPhone app where I need to save and load the screen contents. I was able to save the screen using glReadPixels(), but since there's no glDrawPixels() in openGL ES, I'm having a lot of trouble restoring that buffer to the screen.
I gather that I need to save the screen as a texture:
http://stackoverflow.com/questions/708760/what-is-the-equivalent-of-gldrawpixels-in-opengl-es-1-1
But I'm not sure how to implement this. Does anyone have or know of any code samples that do this? I'm an openGL noob, so any help would be greatly appreciated :)