I wrote a game a while back, and one thing in the game is that blood-spatter gets drawn on the level during gameplay. I achieve this by using a patch I proposed a few years ago, where I suggested a new blend mode (Propose new blend mode, patch included) … This didn’t get much traction from the SDL developers.
The blend mode worked pretty much like SDL_BLENDMODE_BLEND, but it kept the alpha channel of the rendering target unchanged.
I’m wondering if anyone has any ideas of how one would implement this while using the SDL renderer with an unmodified version of SDL2 (as in current trunk, or 2.0.6 when it’s released), as I would prefer to not rewrite my game to use OpenGL for this reason alone.
If performance is ever a problem, you’ll definitely want to minimize the intermediate copies.
If you are using the OpenGL backend for SDL_Renderer, then you should be able to mess with the blend mode yourself before rendering (using GL calls) and then set it back to how it should be.