sdl 2 - How create Surface from memory? [SDL] -


i found interesting function https://wiki.libsdl.org/sdl_rwfrommem

how can using it? need simple program. read image disc, creating in memory surface, , storing in file. next can read file , create texture.

if use sdl_image, function img_load() returns sdl_surface * ready use.

edit: if want read memory instead reading file, use sdl_creatergbsurfacefrom().

then, use sdl_createtexturefromsurface() bind surface texture.


Comments

Popular posts from this blog

javascript - Bootstrap Popover: iOS Safari strange behaviour -

Magento/PHP - Get phones on all members in a customer group -

session - Logging Out Using PHP -