temporarily saving the screen

BlitzMax Forums/BlitzMax Beginners Area/temporarily saving the screen

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.


'// Draw scene
....

'// store backbuffer in Pixmap
Local pm:TPixmap = GrabPixmap(0, 0, GraphicsWidth(), GraphicsHeight());

// or store in an Image'
Local img:TImage = createImage( GraphicsWidth(), GraphicsHeight(), 1, FILTEREDIMAGE | MASKEDIMAGE | DYNAMICIMAGE );
GrabImage(img, x, y );


Note that drawing a full screen-sized Pixmap to the screen is pretty damn slow. You may be better off using the Image method. Problem here is that the PixelFormat for the Image may not match the PixelFormat of the BackBuffer. This will produce some very odd colouring errors. I only get this error when using the DirectX7 driver though. OpenGL seems to work fine.