As part of another project which I'm engaged in, I've started wrapping SFML to provide a slightly more modern 2D graphics system into PureBasic (as well as introducing Squirrel scripting, but that is still partially done so not yet ready to be offered).
After a couple of long weekends of crunching, I'd like to offer an interface to SFML including the following features;
- Open an SFML rendering screen on a PureBasic window or gadget.
- Ability to open multiple screens (though must all be on the main thread because OpenGL)
- Screen control functions
- Loading fonts from memory or file (Supports: TrueType, Type 1, CFF, OpenType, SFNT, X11 PCF, Windows FNT, BDF, PFR and Type 42.)
- Creating text drawables with transformation (scale, rotate, etc), outline and fill and rendering to the screen.
- Loading textures from memory or file (Supports: bmp, png, tga, jpg, gif, psd, hdr and pic -- Avoid jpeg as not all jpeg encoding like progressive is supported)
- Creating sprites from textures, sprite transformation and tinted colouring.
- Partially implemented event handling (Keyboard and Mouse support)
- Ability to resize the SFML screen parent and have the screen view resize (not stretch) with it.
- Colour functions (mfwRGBA, mfwRed, mfwGreen, mfwBlue, mfwAlpha) -- Use these as PureBasic's colour functions aren't compatible due to how colours are stored in 32bit integers.
- Logging component which allows you to define custom logger outputs (console, file, etc). Console logger is included with the sample
- Interval functions module - Call a procedure every x milliseconds (Procedure must return true to repeat, or it'll only fire once)
- 143 named colour preset constants
- Windows x86, x64 DLL (mfwlib.dll) which houses all the components and handles the interfacing. SFML and subsequent components are compiled in Unicode for seamless integration with PureBasic
(Linux will also be included in the distant future when the main project this is part of becomes more mature)
Current backlog:
- Complete Events handling (Handling Joystick, unicode character input)
- Begin wrapping and binding handling of SFML views.
- Identify a suitable automated documentation tool to create a reference guide.
- Discussion about it's open sourcing, and consideration of related project to see if separation can be formed to isolate this library fully into open source domain.
- Investigate how much of the shader library can be implemented
- Introduce particle system
- Retrospective on Squirrel-Language requirement and introduce low-level module for wrapped methods, as well as higher-level module for usage.
GitLab Project Group
https://gitlab.com/mfwlib
Samples Repo
https://gitlab.com/mfwlib/sample
Include Repo
https://gitlab.com/mfwlib/mfw
DLL Source Repo
https://gitlab.com/mfwlib/mfwlib-src
This is provided as-is under CoffeeWare so if you like it then please feel free to get me a coffee https://ko-fi.com/randodev - it'd be greatly appreciated.