SDL_RenderCopy with an array of Rectangles

穿精又带淫゛_ 提交于 2019-12-06 11:42:01

问题


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.

来源:https://stackoverflow.com/questions/20400544/sdl-rendercopy-with-an-array-of-rectangles

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!