bool   savetga(char* Str,int buffer,int xsize,int ysize)

            The output file will be in 32 bits color in all cases.

 

                Str: The name of output file. It can include the the path, end extension.

Buffer: The buffer type when we save the screen.

  GR_BUFFER_FRONTBUFFER        =  0  That the video card show.

  GR_BUFFER_BACKBUFFER          =  1  The render buffer in the background.

  GR_BUFFER_RENDERTARGET    =  2  The current render buffer (it can be the front buffer, or the backbuffer)


xsize,ysize: The output screen size, it is scaling the screen automatically. If it is 0, so the size will be by the backbuffer size.

 

                Result:

                Success