OpenGL Screen Capture

BlitzMax Forums/BlitzMax OpenGL Programming/OpenGL Screen Capture

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.

Oh, yeah, and I notice that SavePixmapPNG() was already mentioned in that code above, I missed it.

What you asked is how to save the backbuffer to an image file, so I presumed you didn't mind using a pixmap. Why wouldn't you want to use a pixmap if it's purpose is just to allow you to save an image?

Or are you thinking of some kind of custom-coded direct backbuffer-to-file image saver which bypasses any temporary storage altogether?

You have to have some kind of a buffer because the only way to get the backbuffer content is to use glReadPixels() which has to go into some area of main memory. You then can convert that to image data and write it to a file, but whether you have Max2D do that part for you or not is up to you how you want it to go.