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.
source share