Load a BMP, PNG or JPEG image from a file.
Defined in <SDL3/SDL_render.h>
SDL_Texture * SDL_LoadTexture(SDL_Renderer *renderer, const char *file);| SDL_Renderer * | renderer | the renderer to use. |
| const char * | file | the file to load. |
(SDL_Texture *) Returns a pointer to a new SDL_Texture structure or NULL on failure; call SDL_GetError() for more information.
The new texture should be freed with SDL_DestroyTexture(). Not doing so will result in a memory leak.
It is safe to call this function from any thread.
This function is available since SDL 3.6.0.