My understanding is that SDL2’s rendering functions must be called from the same thread that created the renderer, you cannot (safely) call them from a different thread. It is difficult to find this documented explicitly, but in SDL_render.h it says “These functions must be called from the main thread”. A related discussion can be found here.