How to save from the "Front Buffer"

BlitzMax Forums/BlitzMax Beginners Area/How to save from the "Front Buffer"

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're using OpenGL you can do glReadBuffer(GL_FRONT) and then glReadPixels() (or maybe grab pixmap).

Alternatively, if you decouple your logic from your graphics refresh, you should be able to re-render the previous frame into the backbuffer - ie when they press pause you skip doing the logic and just redraw the graphics again, then the backbuffer image will be the same as the one they saw.

Also NO, the backbuffer is totally unpredictable after a flip. It could be the same, it could be totally trash, it could be part of a chain of backbuffers which might contain images from several frames ago.