Load a BMP, PNG or JPEG image from a seekable SDL data stream.
Defined in <SDL3/SDL_render.h>
SDL_Texture * SDL_LoadTexture_IO(SDL_Renderer *renderer, SDL_IOStream *src, bool closeio);| SDL_Renderer * | renderer | the renderer to use. |
| SDL_IOStream * | src | the data stream for the texture. |
| bool | closeio | if true, calls SDL_CloseIO() on src before returning, even in the case of an error. |
(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.