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())?


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) {

So every texture that was created with the renderer gets destroyed.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.