beginner's question

Hello, i am a biginner, am just starting OpenGL. i saw examples of the 2-d and 3-d pictures using OpenGL. I would appreciate if someone let know whether it is possible to save such pictures, that are seen on the screen, into the graphical files (eps, png, jpeg etc.)? thanks.

You can write your own snapshot code, or you can use an external snapshot program. What you choose to do is up to you.

Hi, does anybody know how to write the snapshot code from within c++, that is what kind of libraries should one should use, or may be there are other ways of writing snapshot codes ? i would appreciate if you let know, may be, the references and the web-sites. thanks.

Use glReadPixels to get the rendered data, then any image I/O library to write this as a file.
This one can do many formats : http://freeimage.sourceforge.net/
If you are fine with only one format, you can directly use libs such as libpng, libjpeg, etc.

freeimage looks interesting and promising.
Does anybody know how to save rendered data in EPS format ? what kind of libraries one has to use ? or may be to write eps-file by your own ? thanks.

GraphicsMagick can read/write any file format.

This is easiest and the best, there’s also a stb_image_write.h file on the same site:

http://nothings.org/stb_image.c

I always use a screen capture program btw. If you are a noob and don’t have much to show anyhow, why bother with the additional workload of writing snapshot code.