James Cowgill 91327373b0 Fix comments and address ordering in IpAddress::getLocalAddress
The old code says "The method here is to connect a UDP socket to
anyone (here to localhost)", but connecting to `localhost` doesn't
work because the connection would go via the loopback interface which
always has a local address of `127.0.0.1`.

The current code works on little-endian platforms due to a mistake in
the `createAddress` call. We pass `ntohl(INADDR_LOOPBACK)` as the IP,
but since `INADDR_LOOPBACK` is already in host order this actually
connects to `1.0.0.127`.

Fix the comments and intentionally connect to `1.1.1.1` (as a known
public IP address). This also fixes this call for big-endian
platforms.
2025-02-16 21:05:40 -07:00
2025-01-18 19:12:52 -08:00
2025-02-05 14:04:44 -07:00
2025-01-20 18:11:22 -07:00
2024-04-25 10:24:11 +02:00
2015-02-06 11:07:39 +01:00
2024-12-21 11:28:47 -06:00
2025-01-31 16:09:44 -07:00
2024-12-22 11:17:05 -06:00

SFML logo

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.

State of Development

Development is focused on version 3 in the master branch. No more features are planned for the 2.x release series.

CMake Template

The easiest way to get started with SFML is our CMake-based project template. This template will automatically download and build SFML alongside your own application. Read the README for full instructions on how to use it.

Download

  • You can get the latest official release on SFML's website.
  • You can also get the source code of the current development version from the Git repository.
  • Alternatively, you can get the latest snapshot / artifact builds from the artifacts storage.

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:

Community

Here are some useful community links:

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.

Authors

License

The SFML libraries and source code are distributed under the zlib/libpng license. See license.md. External libraries used by SFML are distributed under their own licenses.

In short, SFML is free for any use (commercial or personal, proprietary or open-source). You can use SFML in your project without any restriction. You can even omit to mention that you use SFML -- although it would be appreciated.

External libraries used by SFML

Languages
C++ 88.7%
Objective-C++ 6.2%
CMake 3.3%
Objective-C 1.7%