Wiki Page Content

Differences between revisions 5 and 6
Revision 5 as of 2010-10-13 18:54:18
Size: 1080
Editor: SheenaSmith
Comment: update content - pointers, structs
Revision 6 as of 2011-05-17 18:13:55
Size: 1121
Editor: SheenaSmith
Comment: add SDL_GetError to RV
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
#pragma disable-camelcase #pragma camelcase off
Line 23: Line 23:
A pointer to the SDL_RWops structure that is created, or NULL on failure. A pointer to the SDL_RWops structure that is created or NULL on failure; call [[SDL_GetError]]() for more information.

DRAFT

SDL_RWFromMem

Use this function to create an SDL_RWops structure from memory of a certain size.

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; call SDL_GetError() for more information.

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.
*


CategoryAPI, CategoryIO

None: SDL_RWFromMem (last edited 2015-06-20 20:00:06 by PhilippWiesemann)

(Page Info.)
Feedback
Please include your contact information if you'd like to receive a reply.
Submit