Hi Paul.
Thanks for your reply.
I understand that there is no recommended way to get the frame buffer.
I am trying to find another way to get the image data,
I have confirmed that I can get the image data using the glReadPixels function.
Here is an example of a modified DumpFramebuffer function in the sample program.
Is this method inappropriate?
static void DumpFramebuffer( XBitmap* aBitmap )
{
if ( !aBitmap )
return;
/* lock the entire bitmap for read operation */
EwPrint("Lock bitmap with size %d x %d\n", aBitmap->FrameSize.X, aBitmap->FrameSize.Y );
glReadPixels(0, 0, aBitmap->FrameSize.X, aBitmap->FrameSize.Y, GL_RGB, GL_UNSIGNED_BYTE, &pngbuff);
write_png_file(CAPFILE, aBitmap->FrameSize.X, aBitmap->FrameSize.Y, pngbuff);
EwPrint("%s file write\n",CAPFILE ); //
}
Also, some popups are not reflected in the image data and the data seems to be inverted in the X direction.
Any advice would be appreciated.
Best regards
S.Onodera