Anyone got a nice little CopyRect type of function

BlitzMax Forums/BlitzMax Programming/Anyone got a nice little CopyRect type of function

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.

If you want to copy a rect FROM the backbuffer TO the backbuffer, in OpenGL at least you can use glCopyPixels()

You could also use glCopyTexSubImage2D() to copy into a texture then draw the texture.

Otherwise in non-OpenGL specific, use GrabPixmap, then create a second pixmap the size you want, then use Pixmap.paste, then DrawPixmap.