SDL_RenderCopy with an array of Rectangles

2019-04-12 21:14发布

问题:

SDL_RenderCopy only accepts a single input rectangle and a single output rectangle. But if I have a lot of images that I want to be filled, my knowledge of opengl tells me that a bulk operation that draws all images at once can be much faster than one draw call per sprite. SDL_FillRects is already there with a count parameter. But I cant find anything suitable for drawing a lot of sprites.

Is there some function in SDL2 that I am still missing, because I doubt that this optimization can be done automatically.