In my game, there are many units and for each units there's an information widget attached next to them. I use SDL as the game rendering engine.
I currently want to display their ID for debugging purposes.
However, for each unit, I create a texture with their ID, I render it, then I destroy it.
Needless to say that when there are about 40 units on my screen, the game gets pretty laggy (if its any indication, my game currenly weights 25 MB)
How can I get over this?