Slow Framerate under sdl 2.0.12


I am asking for help here as I have completely depleted my sources for answers to my following question.
I have an C/C++ Windows/MacOSX application which utilizes SDL2 for all its graphical needs (window creation, rendering, etc…).

Something very odd is happening when I have decided to update my sdl2 libraries for the project to v2.0.12 from v2.0.8… The framerate of my application has dropped from 60fps to a measily 8-10fps… It seems that SDL_RenderPresent() is taking alot more time to execute with this version… Was there any substantial changes made to the SDL_RenderPresent() function in between those release versions?

Note that for the 2.0.8 case, I had downloaded the pre-built development libraries from the homepage, whereas for 2.0.12 I have decided to compile from source using the Visual Studio solution/Xcode project… Could this be related to the compilation/Linker settings of these ide’s? I have tried so many optimization options to try to mitigate this, and the framerate is still very poor…

Ps. I have also tested with the pre-built v2.0.12 libraries and there is no difference, the framerate is still very low.

Between 2.0.8 and 2.0.12 batching was implemented, so this is likely why SDL_RenderPresent takes so long (instead of drawing within previous calls it is flushing every draw call at the present right now).

It sounds oddly enough that batching caused fps drop. You can explicitly disable it before creation of the renderer using the following hint:


However, keep in mind that batching is only enabled when you create a renderer with first supported backend driver (driver in SDL_CreateRenderer is set to -1).