I’ve developed a sandbox game in SDL 2 and I’m getting near finishing it. I’m looking for a way to save an image of the buffer (It doesn’t matter if it’s just an image; the way it works is just hold the button down, boom, you've placed something
so I don’t need to modify the textures ever again, I’ll just overlap them).
I may be missing some functions recent SDL has added, but I’ve thought of reading every pixel, saving all the information in a huge array, and then exporting that array to a file somehow. I would then tell SDL to render every single pixel of these. I’m not sure how to do that though, so any ideas are welcome.