13#ifndef SDLGRAPHIC_MODULE_HPP
14#define SDLGRAPHIC_MODULE_HPP
30#include <SDL3_image/SDL_image.h>
31#include <SDL3_ttf/SDL_ttf.h>
51 const char *
name()
const override {
return "sdl3"; }
62 return stop(),
nullptr;
146 if (!SDL_Init(SDL_INIT_VIDEO | SDL_INIT_GAMEPAD))
163 SDL_QuitSubSystem(SDL_INIT_VIDEO | SDL_INIT_GAMEPAD);
168 graphic::IWindow2 *_window =
nullptr;
170 unsigned _opened = 0;
171 bool _started =
false;
A vendor's 2D factory : window, input, loaded resources and the objects that reference them....
Definition IGraphic2Module.hpp:37
static constexpr const char * contract
Definition IGraphic2Module.hpp:45
Une police ouverte a une taille donnee.
Definition SdlFont.hpp:32
La manette numero _index, ouverte a la construction.
Definition SdlGamepad.hpp:31
SDL2 ne remplit que IGraphic2Module.
Definition SdlGraphicModule.hpp:44
void deleteWindow(graphic::IWindow2 *window) override
Definition SdlGraphicModule.hpp:73
const char * name() const override
Le fournisseur : "raylib", "sfml", "console"...
Definition SdlGraphicModule.hpp:51
graphic::IWindow2 * createWindow(int32_t screenWidth, int32_t screenHeight, std::string title) override
Definition SdlGraphicModule.hpp:54
graphic::IGamepad * createGamepad(graphic::IWindow *window) override
Definition SdlGraphicModule.hpp:105
const char * type() const override
Le contrat qu'il remplit : "graphic2", "audio", "game"...
Definition SdlGraphicModule.hpp:50
void deletePolygon(graphic::IPolygon *polygon) override
Definition SdlGraphicModule.hpp:120
graphic::IKeyboard * createKeyboard(graphic::IWindow *window) override
Definition SdlGraphicModule.hpp:95
graphic::ISprite * createSprite(graphic::ITexture *texture) override
Definition SdlGraphicModule.hpp:123
void deleteGamepad(graphic::IGamepad *gamepad) override
Definition SdlGraphicModule.hpp:108
graphic::IMouse * createMouse(graphic::IWindow *window) override
Definition SdlGraphicModule.hpp:100
graphic::IFont * createFont(std::string path) override
Definition SdlGraphicModule.hpp:115
void deleteKeyboard(graphic::IKeyboard *keyboard) override
Definition SdlGraphicModule.hpp:98
void deleteFont(graphic::IFont *font) override
Definition SdlGraphicModule.hpp:116
SdlGraphicModule()=default
void deleteMouse(graphic::IMouse *mouse) override
Definition SdlGraphicModule.hpp:103
graphic::IWindow2 * window() override
La fenetre ouverte de ce vendor, nullptr s'il n'y en a pas.
Definition SdlGraphicModule.hpp:90
void deleteText(graphic::IText *text) override
Definition SdlGraphicModule.hpp:132
graphic::IText * createText(std::string text, graphic::IFont *font) override
Definition SdlGraphicModule.hpp:129
void deleteSprite(graphic::ISprite *sprite) override
Definition SdlGraphicModule.hpp:126
~SdlGraphicModule()=default
graphic::ITexture * createTexture(std::string path) override
Definition SdlGraphicModule.hpp:111
graphic::IPolygon * createPolygon(std::vector< Vector2f > points) override
Definition SdlGraphicModule.hpp:119
void deleteTexture(graphic::ITexture *texture) override
Definition SdlGraphicModule.hpp:112
Le clavier d'UNE fenetre.
Definition SdlKeyboard.hpp:33
Definition SdlMouse.hpp:24
Un contour quelconque, decoupe en triangles une fois pour toutes.
Definition SdlPolygon.hpp:35
Une vue sur une texture : decoupe, position, taille, rotation.
Definition SdlSprite.hpp:29
Une chaine rendue en texture, refaite quand elle change.
Definition SdlText.hpp:37
Une image en memoire vive, televersee a la demande.
Definition SdlTexture.hpp:38
Une fenetre SDL et son renderer, implemente IWindow2.
Definition SdlWindow.hpp:50
bool isOpen() override
notice if the window is open
Definition SdlWindow.hpp:93
Loaded font data, independent of any IText that references it. Deleting every IText built with a font...
Definition IFont.hpp:22
Gamepad interface. Not every window can hand one out (a terminal backend has no controller) - IWindow...
Definition IGamepad.hpp:26
Keyboard interface.
Definition IKeyboard.hpp:78
Mouse interface.
Definition IMouse.hpp:30
Polygon interface.
Definition IPolygon.hpp:34
Sprite interface.
Definition ISprite.hpp:22
Text interface.
Definition IText.hpp:26
Loaded pixel data, independent of any ISprite that references it. Deleting every ISprite built from a...
Definition ITexture.hpp:23
A window that can draw 2D. Adds only the 2D drawing surface on top of IWindow's lifecycle/input.
Definition IWindow2.hpp:25
Window lifecycle. No drawing here : every window, 2D-capable or not, has to open, close and pump its ...
Definition IWindow.hpp:27