SFML (Simple Fast Multimedia Library) is a portable and easy to use multimedia API written in C++. You can see it as a modern, object-oriented alternative to SDL. SFML is composed of several packages to perfectly suit your needs. You can use SFML as a minimal windowing system to interface with OpenGL, or as a fully-featured multimedia library for building games or interactive programs.
Official resources
- official website: sfml-dev.org
- official forum
- and other official resources, e.g. tutorials, documentation, ...
Main features
- Portable: SFML compiles on standard platforms like Windows (98, 2000, XP, Vista, 7, 8 and 10) and Unix systems (Linux, and Mac OS X). As the library grows up, support for more operating systems will be added.
- Object-oriented: SFML is written in C++ and provides an efficient, object-oriented design. It relies on standard patterns and idioms to provide a simple and robust framework.
- Easy to use: SFML aims at being easy to manipulate. The effort is put on the internal code to provide the simplest public interface.
- Flexible: Instead of being one big API, SFML rather contains a lot of small packages, that can be chosen and combined according to the intended usage. You can use only the base package to get input and windowing, as well as the full graphics package with sprites and post-effects.
- Easily integrable: SFML can be used in one or more windows, and/or can be integrated with existing interface components. Integration with existing graphical user interface (GUI) libraries is easy so that you can add SFML views into complex interfaces built with Qt, wxWidgets, MFC or whatever.
Languages
SFML is implemented in C++. That said, several bindings have been created for other languages that allow SFML to be used from C, C#, C++/CLI, D, Ruby, OCaml, Java, Python and VB.NET.
System
- Portable and accurate time measurement
- Simple and object-oriented threads and mutexes
- Unicode module for proper conversions between UTF and locale-dependent encodings
Window
- Can be used as a minimal, portable package to replace GLUT or SDL for windowing and input with OpenGL
- Can create several rendering windows
- Can be integrated into components of existing Qt, MFC, wxWidgets, Win32, X11, etc. interfaces
- Provides both a message-based and a real-time interface for handling input
- Can handle mouses with up to five buttons
- Can handle four joysticks with up to seven axes and 32 buttons
Graphics
- Interfaces very easily with OpenGL
- Modern effects available and hardware-accelerated: alpha-blending, rotations, shaders, ...
- Manages memory efficiently, so that you don't have to worry about resources lifetime or storage; you can even load your graphical resources before any window is created
- Can load and save standard image formats: BMP, DDS, JPEG, PNG, TGA, and PSD
- Can load all graphics resources directly from files in memory
- Can use views like in a 3D scene, to zoom / translate / rotate the whole world
- Uses a simplified shader language for adding real-time post-effects
- Easy manipulation of graphical text through bitmap fonts
- Supports unicode characters
- Can load standard font file formats: TTF, CFF, PCF, FNT, BDF, PFR, SFNT, PostScript Type 1, Type 42
Audio
- Uses hardware acceleration whenever possible
- Can load and save standard sound formats: Ogg, WAV, FLAC, AIFF, Au, RAW, paf, 8SVX, NIST, VOC, IRCAM, W64, MAT4, MAT5 PVF, HTK, SDS, AVR, SD2, Core Audio Format, WVE, MPC2K, RF64
- Can load all audio resources directly from files in memory
- 3D sound spacialization
- Easy interface for capturing audio
- Manages memory efficiently, so that you don't have to worry about resources lifetime or storage
- Supports streaming for big files ; you can even write your custom streaming class for any source (network, ...)
- Supports multi-channels formats (mono, stereo, 4.0, 5.1, 6.1, 7.1)
Network
- Implements a portable layer over TCP and UDP sockets
- Easy data transfers through stream-based extensible packets
- Classes to use the HTTP and FTP internet protocols