Scroll to navigation

SDL_OpenIO(3) SDL3 FUNCTIONS SDL_OpenIO(3)

NAME

SDL_OpenIO - Create a custom SDL_IOStream .

SYNOPSIS

#include "SDL3/SDL.h"
SDL_IOStream* SDL_OpenIO(const SDL_IOStreamInterface *iface, void *userdata);

DESCRIPTION

Applications do not need to use this function unless they are providing their own SDL_IOStream
implementation. If you just need an

SDL_IOStream
to read/write a common data source, you should use the built-in implementations in SDL, like

SDL_IOFromFile () or SDL_IOFromMem (), etc.

You must free the returned pointer with SDL_CloseIO ().

FUNCTION PARAMETERS

The function pointers that implement this SDL_IOStream .
The app-controlled pointer that is passed to iface's functions when called.

RETURN VALUE

Returns a pointer to the allocated memory on success, or NULL on failure; call SDL_GetError () for more information.

AVAILABILITY

This function is available since SDL 3.0.0.

SEE ALSO

SDL_CloseIO(3), SDL_IOFromConstMem(3), SDL_IOFromFile(3), SDL_IOFromMem(3)

SDL 3.1.0 SDL