Prepares a constant memory area for use with RWops.
Returns a pointer to a new RWops struct, or NULL if it fails.
SDL_RWFromConstMem sets up a RWops struct based on a memory area of a certain size. It assumes the memory area is not writable.
char bitmap[] = { 66, 77, 86, 2, 0, 0, 0, 0 ... } SDL_RWops *rw; SDL_Surface *img; rw = SDL_RWFromConstMem(bitmap, sizeof(bitmap)); img = SDL_LoadBMP_RW(rw, 1); // Automatically frees the RWops struct for us //Do something with img...
Sdl Class | Tao.Sdl Namespace | SDL_RWFromMem