13#ifndef SFMLGRAPHIC_MODULE_HPP
14#define SFMLGRAPHIC_MODULE_HPP
16#include "IGraphic2Module.hpp"
40 const char *
type()
const override {
return IGraphic2Module::contract; }
41 const char *
name()
const override {
return "sfml"; }
57 const char *
const *
claims()
const override {
58 static const char *claimed[] = {
"opengl",
nullptr };
71 graphic::IWindow2 *
createWindow(int32_t screenWidth, int32_t screenHeight, std::string title)
override {
84 graphic::IWindow2 *
window()
override {
return _window; }
92 void deleteKeyboard(graphic::IKeyboard *keyboard)
override {
delete keyboard; }
97 void deleteMouse(graphic::IMouse *mouse)
override {
delete mouse; }
137 graphic::IText *
createText(std::string text, graphic::IFont *font)
override {
146 graphic::IWindow2 *_window =
nullptr;
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
Sfml only implements IGraphic2Module - no IGraphic3Module, sfml has no native 3D. No fake IModel here...
Definition SfmlGraphicModule.hpp:34
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
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
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
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