I have two questions regarding SDL2's hardware-accelerated texture rendering:
SDL_Createtexture(...)
, are textures automatically pooled/transferred between system RAM and VRAM when VRAM is at a premium? In order to ensure I don't inundate VRAM, I was considering loading textures into surfaces and converting them to textures as and when required (it's unlikely that all textures will fit into VRAM at once).SDL_Texture
instances need to be recreated?No, you don't need to recreate your SDL_Texture
instances after minimize a window or change its resolutions. Maybe you only need to redraw things in the screen after change its resolutions, but not after minimize it.
Also, I recommend you to look at these SDL2 tutorials: https://lazyfoo.net/tutorials/SDL/index.php