Redirecting graphical output

Can anybody help me: I’m trying to
discover a way to redirect the graphic
output generated to funcion specified
in glutDisplayFunction to some common format,
like a gif file or so.

What you need to do is to use glReadPixels(…) to capture the current frame buffer contents into an array (an image) and then save the image to a file. You will need to do this continually (every frame or so), successively generating a sequence of image files. There are several shareware video compositors that will take the image file sequence and make a movie (AVI). There is an example of capturing the frame buffer and using Intel’s JPEG Library to save the image at

Good Luck!