I’m experimenting with SDL2 on SBCs (single board computers). I’m trying to figure out the performance limits and the best way to use SDL.
When copying large textures to the screen with SDL_RenderCopy, I’ve noticed that drawing begins lagging at a certain point but CPU usage remains low. I think the GPU is reaching its limit, in this case. I want to do a test and see how well it matches with the theoretical Mpix/s spec.
Using small textures (and many SDL_RenderCopy operations), CPU usage goes up quickly. It can easily max-out the CPU core (maybe around 1000-1200 calls). The texture size seems to have little effect on the CPU usage.
There must be a way to improve the second scenario and stop using so much CPU. I would expect that most of the work could be done by the GPU.
Maybe I need to check the render target pixel format vs. the source textures. Could that have some overhead for the CPU?
Suggestions? Ideas? Anything I should test?