Has anybody made available a screen capture routine for OpenGL ?
Any help appreciated.
Any help appreciated.
Function ScreenPrint() Local path:String = "C:\Temp\Test" Local fileName:String For Local serial = 0 To 9999 fileName = path + Right("0000" + serial, 4) + ".PNG" If FileType(fileName) = 0 Exit EndIf Next Local pm:TPixmap = CreatePixmap(G.ScreenWidth, G.ScreenHeight, PF_RGB888) glReadPixels(0, 0, G.ScreenWidth, G.ScreenHeight, GL_RGB, GL_UNSIGNED_BYTE, PixmapPixelPtr(pm)) SavePixmapPNG(pm, fileName) FunctionMessage("ScreenPrint() to '" + fileName + "'") End Function
glReadPixels(0, 0, ScreenWidth, ScreenHeight, GL_RGB, GL_UNSIGNED_BYTE, PixmapPixelPtr(pm)) pm = YFlipPixmap(pm)