Advertisement Jump to content


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


Taking snapshop of application

This topic is 5433 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
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

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

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!