As a direct result of this question that I asked a few days ago, I want to draw potentially-complex geometry to a SDL_Texture or, I suppose, an SDL_Surface. Ultimately, I want the foreground of a 2D platformer on this texture so that I cant draw a specific portion to the screen, as explained in the above link. Most of the geometry will be simple rectangles, but I would also like to draw slopes and possibly circles. Diving into OpenGL seems like a viable option at this point, but if I could avoid it, that would be grand.
After calling this, any drawing functions using this renderer will be drawn into the specified texture, instead of to the screen. (Passing
NULL for the texture will make subsequent drawing functions draw to the screen again)
Note that the texture must have been created using the
More details are available in the on-line documentation.