Hello, new dev learning the ways of version 2 here.
I’m drawing a texture into a renderer using SDL_Rect as the destination parameter of SDL_RenderCopy, after which SDL_RenderPresent is used to plot everything to the screen. (which I guess makes it double buffered)
Suppose however that the left corner of that texture is outside the renderer boudary but its length goes into it, making its right side required to draw. I don’t think making SDL_Rect.x negative would work, so I see 2 possible solutions:
trim it manually (add to .x to get to the first visible pixel), which would require checking each and every sprite in this situation;
compose the entire scene in a slightly larger renderer(or texture? surface?) then use the source parameter to trim to the size of the screen. Which should be able to be done with double buffering but my concern is that under the hood it would actually be a “triple buffer”, making it inefficient.