|
| class | SfmlMusic |
| | sfml music stream. More...
|
| class | SfmlSound |
| | Sfml Sound class - references a SfmlSoundBuffer, does not own it. Deleting the sound never touches the buffer. More...
|
| class | SfmlSoundBuffer |
| | Sfml SoundBuffer class - owns the loaded samples. SfmlSound only references it (sf::Sound itself already takes a const sf::SoundBuffer& natively, this contract matches sfml's own model). More...
|
| class | SfmlGamepad |
| | Unlike raylib's GamepadButton (normalized Xbox-style layout), sf::Joystick exposes raw numbered buttons/axes with no guaranteed meaning across controllers/platforms. This uses the common Xbox- style button ordering (0=A,1=B,2=X,3=Y) most drivers report, but it isn't guaranteed the way raylib's mapping is. More...
|
| class | SfmlKeyboard |
| | Maps the contract's keys to sfml scancodes, and reads the state the window accumulated while popping its events. More...
|
| class | SfmlMouse |
| | Maps the contract's buttons to sfml buttons, and reads the state the window accumulated while popping its events. Definitions in SfmlWindow.hpp, once SfmlWindow is complete. More...
|
| class | SfmlFont |
| | Sfml Font class - owns the loaded font. SfmlText only references it (sf::Text itself already takes a const sf::Font& natively). More...
|
| class | SfmlPolygon |
| class | SfmlSprite |
| | Sfml Sprite class - references a SfmlTexture, does not own it. Deleting the sprite never touches the texture. More...
|
| class | SfmlText |
| | Sfml Text class - references a SfmlFont, does not own it. Deleting the text never touches the font. More...
|
| class | SfmlTexture |
| | Sfml Texture class - owns the loaded texture. SfmlSprite only references it (sf::Sprite itself already takes a const sf::Texture& natively, this contract matches sfml's own model). More...
|
| class | SfmlAudioModule |
| | sfml has no explicit audio device init/close step (unlike raylib), nothing to do at construction/destruction here. More...
|
| class | SfmlGraphicModule |
| | Sfml only implements IGraphic2Module - no IGraphic3Module, sfml has no native 3D. No fake IModel here. More...
|
| class | SfmlWindow |
| | Sfml Window class - implements IWindow2 only, sfml has no 3D. More...
|
sfml_impl
version: 0.2.0

SFML 3.0.2 behind igraphic and iaudio.
Exports getGraphic2Module() and getAudioModule(). No getGraphic3Module — sfml has no 3D, so the symbol is absent rather than returning something broken. Get<IGraphic3Module>("sfml_impl") is nullptr.
Two ways to take it
| target | artefact | use |
| sfml_impl | sfml_impl.dylib | the plugin, what ModuleManager::Load() opens |
| sfml_impl_static | libsfml_impl.a | linked in, brings its include dirs |
Neither follows BUILD_SHARED_LIBS : a plugin turned into a .a would fail at runtime with an obscure message. Pick by target name.
Examples
build/sfml_impl_demo_dynamic # dlopen at runtime
build/sfml_impl_demo_static # linked in, no dlopen at all
dynamic takes a dll path in argv[1], so the same binary runs any vendor — including raylib, which it has never seen :
build/sfml_impl_demo_dynamic ../../raylib_impl/build/raylib_impl.dylib ../../raylib_impl/assets
What sfml forced
- Input comes from events, never sf::Keyboard::isKeyPressed(). That query is global and needs macOS Input Monitoring, without which it silently returns nothing.
- setKeyRepeatEnabled(false), else a held key re-fires isKeyPressed.
- FocusLost clears every key, else one stays stuck after cmd+tab.
- sf::Joystick has raw numbered buttons with no guaranteed meaning across controllers, unlike raylib's mapping. Uses the common Xbox ordering.
- Volume is 0-100 natively, [0, 1] in the contract.
- Positional audio is real here (OpenAL). Velocity has no API, so it stays a plain accessor.
Tests
tests/TestSfmlImpl.cpp loads the built dll through ModuleManager like a real game would, checks IGraphic3Module is nullptr, then exercises every 2D and audio contract against real assets.
◆ SFML_CPP_
◆ drawPoly()
◆ drawSprite()
◆ drawText()
◆ getAudioModule()
◆ getGraphic2Module()
◆ getModules()
Tout ce que cette dll fournit, sans avoir a nommer un contrat.
Le point d'entree d'AnonymousModuleManager : un nom unique, le meme pour toutes les dll, donc trouvable sans connaitre les contrats a l'avance. Le chargeur trie ensuite par IModule::type().
IModule ** termine par nullptr, et pas un std::vector : un vecteur ne traverse pas un dlopen sans supposer la meme ABI de bibliotheque standard des deux cotes. La conversion vers IModule * se fait ICI, ou le type complet est connu, donc le decalage eventuel est applique par le compilateur et pas devine par l'appelant.
Le tableau est statique : il appartient a la dll et vit aussi longtemps qu'elle.
◆ GetMouseWheelMove()
| float SfmlMouse::GetMouseWheelMove |
( |
| ) |
const |
|
overridevirtual |
◆ getPosition()
| Vector2f SfmlMouse::getPosition |
( |
| ) |
const |
|
overridevirtual |
◆ isButtonDown() [1/2]
| bool SfmlGamepad::isButtonDown |
( |
Button | button | ) |
const |
|
overridevirtual |
◆ isButtonDown() [2/2]
| bool SfmlMouse::isButtonDown |
( |
Buttons | key | ) |
const |
|
overridevirtual |
notice if a button is down
- Parameters
-
- Returns
- true
-
false
Implements graphic::IMouse.
◆ isButtonPressed() [1/2]
| bool SfmlGamepad::isButtonPressed |
( |
Button | button | ) |
const |
|
overridevirtual |
◆ isButtonPressed() [2/2]
| bool SfmlMouse::isButtonPressed |
( |
Buttons | key | ) |
const |
|
overridevirtual |
notice if a button is pressed
- Parameters
-
- Returns
- true
-
false
Implements graphic::IMouse.
◆ isButtonReleased() [1/2]
| bool SfmlGamepad::isButtonReleased |
( |
Button | button | ) |
const |
|
overridevirtual |
notice if the button is released
- Parameters
-
- Returns
- bool
Implements graphic::IGamepad.
◆ isButtonReleased() [2/2]
| bool SfmlMouse::isButtonReleased |
( |
Buttons | key | ) |
const |
|
overridevirtual |
notice if a button is released
- Parameters
-
- Returns
- true
-
false
Implements graphic::IMouse.
◆ isButtonUp() [1/2]
| bool SfmlGamepad::isButtonUp |
( |
Button | button | ) |
const |
|
overridevirtual |
◆ isButtonUp() [2/2]
| bool SfmlMouse::isButtonUp |
( |
Buttons | key | ) |
const |
|
overridevirtual |
notice if a button is up
- Parameters
-
- Returns
- true
-
false
Implements graphic::IMouse.
◆ isKeyDown()
| bool SfmlKeyboard::isKeyDown |
( |
Keys | key | ) |
const |
|
overridevirtual |
◆ isKeyPressed()
| bool SfmlKeyboard::isKeyPressed |
( |
Keys | key | ) |
const |
|
overridevirtual |
◆ isKeyReleased()
| bool SfmlKeyboard::isKeyReleased |
( |
Keys | key | ) |
const |
|
overridevirtual |
◆ isKeyUp()
| bool SfmlKeyboard::isKeyUp |
( |
Keys | key | ) |
const |
|
overridevirtual |
◆ setPosition()
| void SfmlMouse::setPosition |
( |
Vector2f | position | ) |
|
|
overridevirtual |
◆ whichKeyDown()
Every key HELD right now - like isKeyDown, without having to name the key.
A held key stays in the list every frame. For a debug overlay, a state readout, chord detection.
Walks the whole keyboard : avoid in a hot loop, isKeyDown is a direct lookup.
- Returns
- std::vector<Keys>
Implements graphic::IKeyboard.