PDA

View Full Version : how can I make a TGA file from a frame buffer?



10-22-2001, 03:02 AM
Hello!
I have just

I have a textured scene and I read the frame buffer using:
glReadPixels (0, 0, Width, Height, GL_RGBA, GL_UNSIGNED_BYTE, Buffer);

Then I have to write them in a TGA format file, because this kind of files support the alpha chanel. How can I construct a good TGA format file? I don't know how a TGA header is.

Gavin
10-22-2001, 03:20 AM
Have you searched the web? maybe http://www.google.com/search?q=tga+file+format

Tron
10-22-2001, 05:54 AM
everthing you ever wanted to know about file formats, including tga (;
http://www.wotsit.org/