Sign in to follow this  
sobaka

Screenshot or snapshot from OpenGL .....

Recommended Posts

sobaka    122
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
andrew1123    122
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
Corman    558
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
Ravuya    135
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
sobaka    122
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
Orrill    139
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
sobaka    122
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this