35#ifndef LIBTCOD_RENDERER_SDL2_H_
36#define LIBTCOD_RENDERER_SDL2_H_
39#include <SDL3/SDL_properties.h>
77 struct SDL_Window* window;
78 struct SDL_Renderer* renderer;
81 struct SDL_Texture* __restrict cache_texture;
82 uint32_t sdl_subsystems;
105 int x,
int y,
int width,
int height,
const char* title,
int window_flags,
int vsync,
struct TCOD_Tileset* tileset);
115 SDL_PropertiesID window_props, SDL_PropertiesID renderer_props,
struct TCOD_Tileset* tileset);
161 struct SDL_Texture* __restrict* target);
198 struct SDL_Texture* __restrict target);
Various console functions.
Libtcod display management context.
TCOD_Error
An enum of libtcod error codes.
Definition error.h:48
Deprecated mouse functions.
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.
TCOD_Error TCOD_sdl2_render_texture(const struct TCOD_TilesetAtlasSDL2 *atlas, const struct TCOD_Console *console, struct TCOD_Console *cache, struct SDL_Texture *target)
Render a console onto a managed target texture.
void TCOD_sdl2_atlas_delete(struct TCOD_TilesetAtlasSDL2 *atlas)
Delete an SDL tileset atlas.
TCOD_Error TCOD_sdl2_render_texture_setup(const struct TCOD_TilesetAtlasSDL2 *atlas, const struct TCOD_Console *console, struct TCOD_Console **cache, struct SDL_Texture **target)
Setup a cache and target texture for rendering.
struct TCOD_TilesetAtlasSDL2 * TCOD_sdl2_atlas_new(struct SDL_Renderer *renderer, struct TCOD_Tileset *tileset)
Return a new SDL atlas created from a tileset for an SDL3 renderer.
TCOD_Context * TCOD_renderer_init_sdl3(SDL_PropertiesID window_props, SDL_PropertiesID renderer_props, struct TCOD_Tileset *tileset)
Return a libtcod rendering context using SDL3.
A libtcod console containing a grid of tiles with {ch, fg, bg} information.
Definition console.h:125
A rendering context for libtcod.
Definition context.h:340
The renderer data for an SDL rendering context.
Definition renderer_sdl2.h:76
An SDL tileset atlas.
Definition renderer_sdl2.h:60
int texture_columns
Internal use only.
Definition renderer_sdl2.h:70
struct TCOD_Tileset * tileset
The tileset used to create this atlas.
Definition renderer_sdl2.h:66
struct SDL_Renderer * renderer
The renderer used to create this atlas.
Definition renderer_sdl2.h:62
struct TCOD_TilesetObserver * observer
Internal use only.
Definition renderer_sdl2.h:68
struct SDL_Texture * texture
The atlas texture.
Definition renderer_sdl2.h:64
A container for libtcod tileset graphics.
Definition tileset.h:62