Opengl save image

Hi,

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

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 and www.freshmeat.net

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

Mikael