SDL_gpu  0.11.0
A hardware-accelerated, cross-platform 2D graphics API
Surface Controls
DECLSPEC SDL_Surface *SDLCALL GPU_LoadSurface (const char *filename)
 
DECLSPEC SDL_Surface *SDLCALL GPU_LoadSurface_RW (SDL_RWops *rwops, GPU_bool free_rwops)
 
DECLSPEC GPU_bool SDLCALL GPU_SaveSurface (SDL_Surface *surface, const char *filename, GPU_FileFormatEnum format)
 
DECLSPEC GPU_bool SDLCALL GPU_SaveSurface_RW (SDL_Surface *surface, SDL_RWops *rwops, GPU_bool free_rwops, GPU_FileFormatEnum format)
 

Detailed Description

Function Documentation

◆ GPU_LoadSurface()

DECLSPEC SDL_Surface* SDLCALL GPU_LoadSurface ( const char *  filename)

Load surface from an image file that is supported by this renderer. Don't forget to SDL_FreeSurface() it.

Definition at line 1135 of file SDL_gpu.c.

◆ GPU_LoadSurface_RW()

DECLSPEC SDL_Surface* SDLCALL GPU_LoadSurface_RW ( SDL_RWops *  rwops,
GPU_bool  free_rwops 
)

Load surface from an image file in memory. Don't forget to SDL_FreeSurface() it.

Definition at line 1089 of file SDL_gpu.c.

◆ GPU_SaveSurface()

DECLSPEC GPU_bool SDLCALL GPU_SaveSurface ( SDL_Surface *  surface,
const char *  filename,
GPU_FileFormatEnum  format 
)

Save surface to a file. With a format of GPU_FILE_AUTO, the file type is deduced from the extension. Supported formats are: png, bmp, tga. Returns 0 on failure.

Definition at line 1149 of file SDL_gpu.c.

◆ GPU_SaveSurface_RW()

DECLSPEC GPU_bool SDLCALL GPU_SaveSurface_RW ( SDL_Surface *  surface,
SDL_RWops *  rwops,
GPU_bool  free_rwops,
GPU_FileFormatEnum  format 
)

Save surface to a RWops stream. Does not support format of GPU_FILE_AUTO, because the file type cannot be deduced. Supported formats are: png, bmp, tga. Returns 0 on failure.

Definition at line 1204 of file SDL_gpu.c.