|
Size: 1006
Comment: minor change
|
Size: 1080
Comment: update content - pointers, structs
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 17: | Line 17: |
| ||'''mem'''||^a pointer to the memory location^|| | ||'''mem'''||,,a pointer to ,,^the memory location^|| |
| Line 19: | Line 19: |
<<Color2(green,Is '''mem''' an exception to the 'pointer rule'?)>> |
DRAFT |
SDL_RWFromMem
Use this function to create an SDL_RWops structure from memory of a certain size.
Contents
Syntax
SDL_RWops* SDL_RWFromMem(void* mem,
int size)
Function Parameters
mem |
a pointer to the memory location |
size |
the size of the memory location |
green
Return Value
A pointer to the SDL_RWops structure that is created, or NULL on failure.
Code Examples
*
char bitmap[310000];
SDL_RWops *rw;
rw = SDL_RWFromMem(bitmap, sizeof(bitmap));
SDL_SaveBMP_RW(screen, rw, 0);
*
Remarks
*
If the memory is not writable, use SDL_RWFromConstMem() instead.
*
Related Functions
SDL_RWFromFile ???
SDL_RWFromFP ???
