Function TCOD_renderer_init_sdl2¶
Defined in File renderer_sdl2.h
Function Documentation¶
-
struct TCOD_Context *TCOD_renderer_init_sdl2(int x, int y, int width, int height, const char *title, int window_flags, int vsync, struct TCOD_Tileset *tileset)¶
Return a libtcod rendering context using an SDL renderer.
Despite the name this returns a context for SDL3.
- Parameters:
x – Window X position, if unsure then use
SDL_WINDOWPOS_UNDEFINEDy – Window Y position, if unsure then use
SDL_WINDOWPOS_UNDEFINEDwidth – Window width in pixels
height – Window height in pixels
title – Window title text
window_flags – SDL window flags, see
SDL_WindowFlagsvsync – Enables VSync
tileset – The tileset to use for this context.
- Returns:
The new context, will need to deleted with TCOD_context_delete when you are done with it.