maximizing screenshots

I’m working on some code for a game engine, and wanted to implement a feature. Unfortunately I’m not even sure this is doable so I’d like to get some input regarding this. Currently, the engine itself allows the user to take a screenshot at the resolution the game is running at, for instance the game running at 1024x768 gives screenshots at that resolution. I was curious as to whether or not it would be possible get the engine to use a framebuffer that would set the image height and width to whatever the user wanted, say 1600x1200, and take the screenshot at 1600x1200 while keeping the games resolution at 1024x768. Is this doable or am I trying to think up the unthinkable?


Yes, perfectly doable.
You need to create an offscreen framebuffer with FBO (framebuffer object extension), render one frame to it with the specific resolution, glReadPixel from it, destroy it afterwards.

These tutorials are pretty neat :

Yes and no.
Because of some driver limitations, most of the drivers doesn’t support to create FBOs larger than the current screen resolution. More clearly you can create one, but the offsets over the current resolution pixel count doesn’t work always correctly.

@aqnuep : Can you be more precise about the drivers and video cards that exhibits this problem ?