View Full Version : maximizing screenshots
11-19-2008, 09:39 PM
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?
11-19-2008, 11:28 PM
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 :
11-20-2008, 12:06 AM
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.
11-20-2008, 02:36 AM
@aqnuep : Can you be more precise about the drivers and video cards that exhibits this problem ?
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.