GFXprim
2D bitmap graphics library with emphasis on speed and correctness
|
A SDL backend. More...
Go to the source code of this file.
Enumerations | |
enum | gp_sdl_flags { GP_SDL_FULLSCREEN = 0x01 , GP_SDL_RESIZABLE = 0x02 } |
SDL backend init flags. More... | |
Functions | |
gp_backend * | gp_sdl_init (gp_size w, gp_size h, uint8_t bpp, enum gp_sdl_flags flags, const char *caption) |
Initalizes SDL as drawing backend. | |
A SDL backend.
SDL doesn't expose file descriptors, so the backend does polling.
The backend is thread safe (the critical parts are guarded with a mutex).
The backend is singleton, you can't have two SDL backends running at the same time.
Definition in file gp_sdl.h.
enum gp_sdl_flags |
gp_backend * gp_sdl_init | ( | gp_size | w, |
gp_size | h, | ||
uint8_t | bpp, | ||
enum gp_sdl_flags | flags, | ||
const char * | caption | ||
) |
Initalizes SDL as drawing backend.
When backend is allready initalized, this function ignores it's parameters and returns pointer to allready initalized SDL backend.
The parameters w h and bpp are directly passed to SDL_SetVideoMode().
If w, h and/or bpp are set to zero, SDL tries to do best fit.
w | A requested window width. |
h | A requested window height. |
bpp | A requested depth, bits per pixel. |
flags | A SDL backend init flags. |
caption | A window caption. |