Screenshot or snapshot from OpenGL .....

Started by
6 comments, last by sobaka 16 years, 11 months ago
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===================*/
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.
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.
Developer Journal: The Life of Corman
You can also use the glCopyTex* methods and then convert the resulting textures back to an array.
Thanks for answers, is they are any tutorials for this? Or everybody doing by they own style or whatever.
I found this page

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

scroll down to the Screen shot example.

It seems pretty straight forward.
can anyone help me ?

[Edited by - sobaka on May 3, 2007 10:29:12 PM]
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.

This topic is closed to new replies.

Advertisement