The documentation on the SDL wiki states:
Use this function to destroy the rendering context for a window and free associated textures
So does this mean that every texture I create will be freed (even those still used) or only the ones that were destroyed manually (by using SDL_DestroyTexture()
)?
Answer
It means that all existing textures are freed. I checked the SDL source and inside the SDL_DestroyRenderer
function they do this:
while (renderer->textures) {
SDL_DestroyTexture(renderer->textures);
}
So every texture that was created with the renderer gets destroyed.
No comments:
Post a Comment