Taking snapshop of application

Started by
1 comment, last by nicosio 20 years, 1 month ago
Hello Does anyone knows how to make the application take a snapshot of the OpenGL Window?, so it canbe saved as BMP, TGA or other format. Thank you, Nicosio
Advertisement
Here is what I recommend....

Use glReadPixels() to retrieve the picture information from the framebuffer in GL_RGB format.

Create A DIB or do some other type of routine to convert the raw RGB pixel data into a usable picture format. (for info on formats, try www.wotsit.org)

come up with some way to name each new screenshot file so that it is different than the last.

finally, Use ofstream (or other file-writing code option) to write the picture data into a file using the aforementioned filename.

Good Luck!
Thank you, that is all that I need

This topic is closed to new replies.

Advertisement