This module provides a device-level API for SDL-based displays. More...
|
Enumerations | |
| enum | dev_sdl_flags_t { dev_sdl_none = 0, dev_sdl_fullscreen = 1 << 0, dev_sdl_borderless = 1 << 1, dev_sdl_centered = 1 << 2, dev_sdl_hidden = 1 << 3 } |
| Flags for SDL display creation. More... | |
Lifecycle | |
| pix_display_t * | dev_sdl_init (const char *title, pix_size_t size, pix_format_t format, dev_sdl_flags_t flags, uint16_t interval_ms) |
| Initialize an SDL-backed display. More... | |
This module provides a device-level API for SDL-based displays.
| enum dev_sdl_flags_t |
Flags for SDL display creation.
| pix_display_t* dev_sdl_init | ( | const char * | title, |
| pix_size_t | size, | ||
| pix_format_t | format, | ||
| dev_sdl_flags_t | flags, | ||
| uint16_t | interval_ms | ||
| ) |
Initialize an SDL-backed display.
| title | The window title. NULL falls back to the program's own name. |
| size | The display size, in pixels. |
| format | The pixel format the display's bitmap should use. |
| flags | Window creation flags - see dev_sdl_flags_t. |
| interval_ms | Minimum time between flushes, in ms - 0 for no rate limit ("as often as possible"). |
NULL on failure (SDL2 unavailable on this build, an unsupported format, or the underlying SDL_CreateWindow()/SDL_CreateRenderer()/ SDL_CreateTexture() call failing).