Jump to content
  • Advertisement
Sign in to follow this  
sobaka

Screenshot or snapshot from OpenGL .....

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

Can anyone forward me to tutorial where I can find how to take a snapshot from OpenGL scene in different formats? Like BMP and PNG or JPG. Or any information will be appreciated. Thanks in advance. /*=====================L2LIVE===================*/

Share this post


Link to post
Share on other sites
Advertisement
If this is only for you to make the screenshot while your making whatever your making, just use the Print Screen on your keyboard, then press paste in MS Paint.

Share this post


Link to post
Share on other sites
All you need to do is use glReadPixels to read every pixel on the screen into an array that you can then supply that to your image lib of choice.

Share this post


Link to post
Share on other sites
You can also use the glCopyTex* methods and then convert the resulting textures back to an array.

Share this post


Link to post
Share on other sites
Thanks for answers, is they are any tutorials for this? Or everybody doing by they own style or whatever.

Share this post


Link to post
Share on other sites
I found this page

http://www.robthebloke.org/opengl_programming.html

scroll down to the Screen shot example.

It seems pretty straight forward.

Share this post


Link to post
Share on other sites
TO Orrill
Example which you give me a link don’t work even it’s create a file which tga format and can't be viewed I need simple bmp file.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!