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.