Decreased image quality OpenGL ES (iPhone)

I am currently using this method from Apple to take screenshots of my OpenGL ES iPhone game. Screenshots look great. However, taking a screenshot leads to a slight stutter in the game (otherwise it runs smoothly at a speed of 60 frames per second). How can I change Apple's method to take lower quality pictures (hence eliminating stuttering caused by taking a screenshot)?

Edit # 1 : The ultimate goal is to create a game video using AVAssetWriter . There may be a more efficient way to generate the CVPixelBuffers referenced by this SO post .

+4
source share
3 answers

The Apple method uses glReadPixels() , which simply pulls all the data from the display buffer and probably triggers synchronization barriers, etc. between the GPU and the processor. You cannot make this part faster or lower.

Are you doing this to create a one-time video? Or do you want the user to be able to call this behavior in production code? If the first one, you can do all kinds of tricks to speed it up - reduce the size for everything, do not make present at all and just capture frames based on recording the input data launched into the game, or other similar tricks, or even run this simulation halfway speed to get all the frames.

I am less useful if you need a valid in-game function for this. Maybe someone else will.

+2
source

What is the purpose of the recording?

  • If you want to play the sequence on the device, you can instead save the location of the positions, etc. and redraw the sequence in 3D. It also allows you to play sequences from other viewpoints.

  • If you want to show a game, for example, youtube or something else, you can watch the game with another device / camera or record some gameplay running in the simulator using some kind of screen capture software as ScreenFlow.

+3
source

If all else fails.

Get one of these http://store.apple.com/us/product/MC748ZM/A

And then convert this composite video to digital through some external device. I did this when I converted vhs movies to dvd a long time ago.

+2
source

All Articles