SDL_RWops *rw = SDL_RWFromMem(ptr_to_image_data,
size_of_mem_block_in_bytes);
SDL_Surface *img = IMG_Load_RW(rw, 1);
free(ptr_to_image_data);
Where are the docs for things like the SDL_RWops structure?–
B. Sizer
SDL_RWops *rw = SDL_RWFromMem(ptr_to_image_data,
size_of_mem_block_in_bytes);
SDL_Surface *img = IMG_Load_RW(rw, 1);
free(ptr_to_image_data);
Where are the docs for things like the SDL_RWops structure?–
B. Sizer
Where are the docs for things like the SDL_RWops structure?
It’s acceptably documented in:
SDL12/include/SDL_rwops.h
It’s rather straightforward, if you understand the concept of a
pointer-to-a-function (mostly, a SDL_RWops object is just a struct
with a bunch of function pointers…it’s like a C++ class without C++).
Never trust the docs, when you can look at the source.
–ryan.