View Full Version : Redirecting graphical output

02-13-2002, 06:26 AM
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.

02-13-2002, 09:10 AM
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 http://codeguru.earthweb.com/opengl/snaptojpeg.shtml

Good Luck!