SFML playground
de0ba77d3b
On an X set-up with multiple monitors running separate X screens (as opposed to merging them into one large X screen using Xinerama), the selected X visual needs to be one for the screen where the colormap, window, and other X resources are created. In fact, all these need to match, and the GL context as well. Most of the SFML windowing and graphics code uses (X)DefaultScreen() for that, which is fine. Combined with XOpenDisplay(NULL), this will create the window on the screen (and monitor) selected by the DISPLAY enviroment variable. :0.0 will be the first monitor, :0.1 the second, etc. However, XGetVisualInfo() will return visuals for *all* screens, not just the default one. They seem to be ordered by screen number, but I don't think the standard makes any guarantees there. If the visual doesn't match up with the screen, this will abort with an X error. BadMatch, in many cases. This means that in addition to other filtering, GlxContext::selectBestVisual() needs to filter the visuals by screen number, otherwise SFML won't work at all on any screens but the first. This fixes issue #724. |
||
---|---|---|
.github | ||
cmake | ||
doc | ||
examples | ||
extlibs | ||
include/SFML | ||
src/SFML | ||
tools | ||
.editorconfig | ||
.gitattributes | ||
changelog.md | ||
CMakeLists.txt | ||
CONTRIBUTING.md | ||
license.md | ||
readme.md |
SFML — Simple and Fast Multimedia Library
SFML is a simple, fast, cross-platform and object-oriented multimedia API. It provides access to windowing, graphics, audio and network. It is written in C++, and has bindings for various languages such as C, .Net, Ruby, Python.
Authors
- Laurent Gomila — main developer (laurent@sfml-dev.org)
- Marco Antognini — OS X developer (hiura@sfml-dev.org)
- Jonathan De Wachter — Android developer (dewachter.jonathan@gmail.com)
- Jan Haller (bromeon@sfml-dev.org)
- Stefan Schindler (tank@sfml-dev.org)
- Lukas Dürrenberger (eXpl0it3r@sfml-dev.org)
- binary1248 (binary1248@hotmail.com)
- Artur Moreira (artturmoreira@gmail.com)
- Mario Liebisch (mario@sfml-dev.org)
- And many other members of the SFML community
Download
You can get the latest official release on SFML's website. You can also get the current development version from the Git repository.
Install
Follow the instructions of the tutorials, there is one for each platform/compiler that SFML supports.
Learn
There are several places to learn SFML:
- The official tutorials
- The online API documentation
- The community wiki
- The community forum (French)
Contribute
SFML is an open-source project, and it needs your help to go on growing and improving. If you want to get involved and suggest some additional features, file a bug report or submit a patch, please have a look at the contribution guidelines.