View Full Version : Opengl save image

10-28-2004, 01:34 PM

How can i save the drawings on a GLCanvas as a image file.

10-29-2004, 12:00 AM
Hi !

You can't with OpenGL.

You can get image with glReadPixels into a buffer, then you will need to use other code or an existing library to save the code in some format.

There are lots of libraries available for reading/writing images, have a look at www.sourceforge.net (http://www.sourceforge.net) and www.freshmeat.net (http://www.freshmeat.net)

If you want to do it yourself, most image file formats can be found at www.wotsit.org (http://www.wotsit.org)