Skip to content

Update to SFML 3.1.0 - #419

Open
eXpl0it3r wants to merge 15 commits into
masterfrom
feature/sfml-3.1
Open

eXpl0it3r wants to merge 15 commits into
masterfrom
feature/sfml-3.1

Conversation

@eXpl0it3r

@eXpl0it3r eXpl0it3r commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

Description

Updates CSFML to SFML 3.1.0. Every commit covers one area, so it should be reviewable commit by commit.

CSFML now requires SFML 3.1 and CMake 3.28, same as SFML itself. The Linux CI jobs install HarfBuzz, MbedTLS and libssh2, and the ClangCL jobs are enabled again, since SFML 3.1 bundles FLAC 1.5.0, which compiles fine with VS2026's ClangCL.

New APIs:

  • System: sfGetVersion and sfTimeoutWithPredicate
  • Graphics: miter limit for all shapes, sfFont_getAscent, sfFont_getDescent, sfFont_getGlyphById, new sfFontInfo fields, and the text shaping API for sfText (line alignment, orientation, cluster grouping, shaped glyphs, glyph pre-processor callback and vertex data access)
  • Audio: sfPlaybackDevice, which CSFML didn't wrap at all so far
  • Network: IPv6 for sfIpAddress, sfDns, TLS for sfTcpSocket, readiness callbacks for sfSocketSelector, HTTPS verification for sfHttp and the new sfSftp

Deprecated SFML APIs stay available and are marked with CSFML_DEPRECATED, i.e. all of sfFtp, the touch functions, sfText_findCharacterPos and the new sfIpAddress_resolve.

Note that this breaks the C API in a few places, where SFML's API requires it:

  • sfIpAddress holds 46 characters to fit IPv6 addresses
  • sfIpAddress_fromString no longer resolves host names, same as sf::IpAddress::fromString, use sfDns_resolve instead
  • sfFontInfo has new fields
  • sfSocketSelector_add*/remove* and sfHttp_setHost return bool

How to test this PR?

CI should succeed.

Write examples, run examples that use the new APIs.

- Require CMake 3.28 to match SFML

- Install HarfBuzz, MbedTLS and libssh2 for Linux CI builds

- Bump CSFML and NuGet package version to 3.1.0
The deprecated functions remain available, matching SFML. Font kerning now calls the char32_t overload, since the std::uint32_t one is deprecated.
- Grow sfIpAddress to hold IPv6 addresses and add address types

- Make sfIpAddress_fromString not resolve network names anymore, matching sf::IpAddress::fromString, and add the deprecated sfIpAddress_resolve

- Add sfDns for resolving hostnames and querying NS, MX, SRV and TXT records
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant