- tex.GrabScreen(0, 0, 800, 600, tfRGB8ub3); // copy current framebuffer content to texture
- tex.SaveToFile(ExtractFilePath(ApplicationName) + 'screen.bmp', ftBMP); // save texture to file
+ TglBitmap2D.GrabScreen(0, 0, 800, 600, tfRGBA8ui1, data); // read pixels from frame buffer
+ data.SaveToFile( // save data to file
+ ExtractFilePath(ApplicationName) +
+ 'screen.bmp', ftBMP);