SDL School

API reference / Images and textures

SDL_DestroyTexture

Function, SDL3

Frees a texture. After this call, the texture pointer is not valid.

Declaration

#include <SDL3/SDL.h>

void SDL_DestroyTexture(SDL_Texture *texture);

Parameters

textureThe texture.

Example

Load an image
SDL_DestroyTexture(ship);

See this code run in Load an image. Download the full program (.zip)

Notes

In SDL2

The name is the same.

See also