copyContentsToMemory massively faster from rendered texture


07-07-2011 09:11:50


I've been trying to find an efficient way to capture/save the screen image from frames and save them all to disk.

I've read lots of people saying it's just slow and it's 'all about getting the data out of the GPU'.
Well, I call BS on that.

If I renderTarget.copyContentsToMemory(pixelBox), on the main display window, I get about 1 frame per second throughput, without even saving it to disk.
I think this is essentially what renderWindow.writeContentsToFile() function does.

However, if I actually re-render the whole scene to a texture of the same size and renderTexture.copyContentsToMemory(pixelBox), I get about 30 frames per second throughput without saving to disk.
I'm quite happy with this performance result, but it seems a bit odd and renderingly(?) wasteful..
Seems like something someone in the Ogre Core development space might want to take a look at sometime.

Is there a way I can not do the main screen render and just do my render to texture?