I might be able to help you optimize your code but, I have a few questions:
- Is the ‘//Create Map Texture’ code executed each frame?
- Why are you setting the ‘map.map_texture’ to be the current render target? I can’t see that you’re doing anything with it after you’ve set it to be the current render target.
- What’s the reason you want to render all those SDL_Rect’s?’
- The map you’re rendering, is it a tile map?