13#ifndef SFMLGRAPHIC_MODULE_HPP
14#define SFMLGRAPHIC_MODULE_HPP
41 const char *
name()
const override {
return "sfml"; }
57 const char *
const *
claims()
const override {
58 static const char *claimed[] = {
"opengl",
nullptr };
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
Sfml Font class - owns the loaded font. SfmlText only references it (sf::Text itself already takes a ...
Definition SfmlFont.hpp:27
Unlike raylib's GamepadButton (normalized Xbox-style layout), sf::Joystick exposes raw numbered butto...
Definition SfmlGamepad.hpp:35
graphic::ISprite * createSprite(graphic::ITexture *texture) override
Definition SfmlGraphicModule.hpp:129
void deleteMouse(graphic::IMouse *mouse) override
Definition SfmlGraphicModule.hpp:97
const char *const * claims() const override
Revendique "opengl" : aucun autre vendor OpenGL en meme temps.
Definition SfmlGraphicModule.hpp:57
graphic::IPolygon * createPolygon(std::vector< Vector2f > points) override
Definition SfmlGraphicModule.hpp:121
const char * type() const override
Le contrat qu'il remplit : "graphic2", "audio", "game"...
Definition SfmlGraphicModule.hpp:40
graphic::IWindow2 * createWindow(int32_t screenWidth, int32_t screenHeight, std::string title) override
Ouvre une fenetre. sfml sait en tenir plusieurs.
Definition SfmlGraphicModule.hpp:71
graphic::IFont * createFont(std::string path) override
Definition SfmlGraphicModule.hpp:113
SfmlGraphicModule()=default
void deleteWindow(graphic::IWindow2 *window) override
Definition SfmlGraphicModule.hpp:78
graphic::IGamepad * createGamepad(graphic::IWindow *window) override
Definition SfmlGraphicModule.hpp:99
void deleteSprite(graphic::ISprite *sprite) override
Definition SfmlGraphicModule.hpp:132
void deleteTexture(graphic::ITexture *texture) override
Definition SfmlGraphicModule.hpp:108
void deleteFont(graphic::IFont *font) override
Definition SfmlGraphicModule.hpp:116
graphic::IKeyboard * createKeyboard(graphic::IWindow *window) override
Definition SfmlGraphicModule.hpp:89
graphic::IMouse * createMouse(graphic::IWindow *window) override
Definition SfmlGraphicModule.hpp:94
graphic::IWindow2 * window() override
La fenetre ouverte de ce vendor, nullptr s'il n'y en a pas.
Definition SfmlGraphicModule.hpp:84
void deleteGamepad(graphic::IGamepad *gamepad) override
Definition SfmlGraphicModule.hpp:102
void deletePolygon(graphic::IPolygon *polygon) override
Definition SfmlGraphicModule.hpp:124
const char * name() const override
Le fournisseur : "raylib", "sfml", "console"...
Definition SfmlGraphicModule.hpp:41
graphic::IText * createText(std::string text, graphic::IFont *font) override
Definition SfmlGraphicModule.hpp:137
~SfmlGraphicModule()=default
void deleteText(graphic::IText *text) override
Definition SfmlGraphicModule.hpp:140
graphic::ITexture * createTexture(std::string path) override
Definition SfmlGraphicModule.hpp:105
void deleteKeyboard(graphic::IKeyboard *keyboard) override
Definition SfmlGraphicModule.hpp:92
Maps the contract's keys to sfml scancodes, and reads the state the window accumulated while popping ...
Definition SfmlKeyboard.hpp:41
Maps the contract's buttons to sfml buttons, and reads the state the window accumulated while popping...
Definition SfmlMouse.hpp:29
Definition SfmlPolygon.hpp:25
Sfml Sprite class - references a SfmlTexture, does not own it. Deleting the sprite never touches the ...
Definition SfmlSprite.hpp:27
Sfml Text class - references a SfmlFont, does not own it. Deleting the text never touches the font.
Definition SfmlText.hpp:28
Sfml Texture class - owns the loaded texture. SfmlSprite only references it (sf::Sprite itself alread...
Definition SfmlTexture.hpp:28
Sfml Window class - implements IWindow2 only, sfml has no 3D.
Definition SfmlWindow.hpp:46
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