5#ifndef INCLUDE_FIFECHAN_BACKENDS_SDL_SDL_HPP_
6#define INCLUDE_FIFECHAN_BACKENDS_SDL_SDL_HPP_
12#include "fifechan/platform.hpp"
18#include <fifechan/backends/sdl3/graphics.hpp>
19#include <fifechan/backends/sdl3/image.hpp>
20#include <fifechan/backends/sdl3/imageloader.hpp>
21#include <fifechan/backends/sdl3/input.hpp>
22#include <fifechan/backends/sdl3/truetypefont.hpp>
27 using Graphics = fcn::sdl3::Graphics;
30 using Image = fcn::sdl3::Image;
36 using Input = fcn::sdl3::Input;
42 inline std::shared_ptr<SDL_Window> makeSDLSharedPtr(SDL_Window* window)
44 return std::shared_ptr<SDL_Window>{window, [](SDL_Window* value) {
45 if (value !=
nullptr) {
46 SDL_DestroyWindow(value);
52 inline std::shared_ptr<SDL_Renderer> makeSDLSharedPtr(SDL_Renderer* renderer)
54 return std::shared_ptr<SDL_Renderer>{renderer, [](SDL_Renderer* value) {
55 if (value !=
nullptr) {
56 SDL_DestroyRenderer(value);
62 inline std::shared_ptr<SDL_Surface> makeSDLSharedPtr(SDL_Surface* surface)
64 return std::shared_ptr<SDL_Surface>{surface, [](SDL_Surface* value) {
65 if (value !=
nullptr) {
66 SDL_DestroySurface(value);
72 inline std::shared_ptr<SDL_Texture> makeSDLSharedPtr(SDL_Texture* texture)
74 return std::shared_ptr<SDL_Texture>{texture, [](SDL_Texture* value) {
75 if (value !=
nullptr) {
76 SDL_DestroyTexture(value);
SDL3 renderer-specific implementation of the Graphics interface.
SDL3-specific implementation of ImageLoader.
SDL3-specific implementation of Image.
SDL3/FreeType implementation for rendering TrueType fonts.