I'm presently working on a 3D car racing game for the iOS platform. I had to implement a replay system and then record that replay in a video file to upload it to YouTube.
I'm only having issues with the recording part, the rest is done. What I'm doing is using the glReadPixels()
command of OpenGL ES 1.1 to capture the framebuffer content and creating a video from these frames during runtime (using AVFoundation framework).
The problem I'm facing is that I have to call glReadPixels()
in each update which is very slow . It decreases the FPS from around 30 to only 2-3...
Is there any alternative to the glReadPixels()
command?
Or did anyone create a replay system and recorded to video?