SFML

From Mario Fan Games Galaxy Wiki
 Black!box.gif Deletion of this page has been requested for the following reason:

This page has nothing to do with MFGG as pretty much no one on MFGG uses this.

Do not remove this message box without good reason.
If you contest this article's deletion, discuss it on the talk page.

SFML, or Simple and Fast Media Library, is a free and open-source media library written in C++, although it has ports to C, C#, Python, D, and Ruby. It has 5 Core Libraries, System, Window, Graphics, Audio, and Network. All of the Libraries depend on System, and Graphics also depends on Window. The Libraries are currently at V1.5, and there is a V1.6 and a V2.0 in development. V2.0 will be a complete rewrite of the Libraries.

System

Multi-Threading

The System Library has good support for Function-Based Multi-Threading. This means that it can create Threads, or "Mini-Programs", that run at the same time as the Main Program. These Threads use a Single Function for determining their code, which can use other functions as well. This Function is passed to the Thread class, sf::Thread, in the Constructor of the Thread. However, to provide more flexibility, the Thread Class can also be used as a base Class, and the code for this Base Class is stored in the Run() virtual function.

Window

The Window Library has a very simple cross-platform Window class that wraps up all of the OS-specific functions for handling a Window. The Window class takes care of grabbing events from the OS, displaying the Window, controlling the frame rate, controlling the OpenGL context, etc. All the programmer needs to do is create a loop that run while the window is open, and in that loop, make another loop that grabs and processes events from the Window class, do the logic, do the rendering, and then call the Window's display function to display the window.

External Links