glReadBuffer(GL_BACK);
// Read the image data from the framebuffer
glReadPixels(0,0,weidth,height,(GLenum)GL_RGBA,GL_UNSIGNED_BYTE,FBuffer);
// Write the new BGR framebuffer data to the Targa file
fwrite(TGAheader,1,sizeof(TGAheader),Outfile); // TGA Header