• Advertisement

Archived

This topic is now archived and is closed to further replies.

Taking snapshop of application

This topic is 5101 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites

  • Advertisement