I'm trying to create a simple 2D game using C++ and SDL2.
I thought it would be a good idea to go for a "layered" rendering model.
I would render my background first, then the world, then the constructs (things like building etc.), then the objects (NPC's etc.) and lastly a toggle-able debug-overlay.
Right now I'm just trying to render a background and a debug overlay but I've hit a wall.
I can't seem to be able to render my debug-overlay on top of my background.
I've set blending mode to SDL_BLENDMODE_NONE for the background and SDL_BLENDMODE_BLEND for the debug overlay.
The problem is however, that my background is loaded from a PNG file, but when calling SDL_CreateTextureFromSurface() the texture access is set to SDL_TEXTURE_ACCESS_STATIC. (Which can't be used as a target if I understand correctly).
My question is: How can I circumvent this issue? How can I make my background "drawable"?