Opened 21 months ago

Closed 11 months ago

Last modified 8 months ago

#20958 closed enhancement (fixed)

SDL-3.2.26

Reported by: Bruce Dubbs Owned by: zeckma
Priority: normal Milestone: 13.0
Component: BOOK Version: git
Severity: medium Keywords:
Cc:

Description

New major version. It's unclear if it is API compatible with SDL2. I suspect not.

From the release:

Announcing the SDL 3 official release!

SDL 3.0 is finally here!

Here are some of the highlights of what's new in SDL 3.0:

  • Extremely good documentation: We've spent a ton of effort writing and revising the API reference.
  • Example programs to get you started, running in your web browser!
  • More consistent API naming conventions. Everything is named consistently across the API now, instead of different subsystems taking different approaches. Also, we've tended toward more descriptive names for things in SDL3.
  • Main Callbacks: optionally run your program from callbacks instead of main().
  • GPU API: access to modern 3D rendering and GPU compute in a cross-platform way.
  • Dialog API: access to system file dialogs (file and folder selection UI for opening/saving).
  • Filesystem API: simple directory management and globbing, access to topic-specific user folders.
  • Storage API: Abstract interface to platform-specific storage.
  • Camera API: access to webcams.
  • Pen API: access to pens (like Wacom tablets and Apple Pencil, etc).
  • Logical audio devices: different parts of an app can get their own unique audio device to use.
  • Audio streams: handle buffering, converting, resampling, mixing, channel mapping, pitch, and gain. Bind to an audio device and go!
  • Default audio devices: SDL3 will automatically manage migrating to new physical hardware as devices are plugged in, ripped out, or changed.
  • Properties API: fast, flexible dictionaries of name/value pairs.
  • Process API: Spawn child processes and communicate with them in various ways.
  • Colorspace support: Surfaces and the renderer, etc, can manage multiple colorspaces.
  • The Clipboard API can support any data type (SDL2 only handled text), and apps can provide data in multiple formats upon request in a provided callback.
  • Better keyboard input, for all your keypress needs.
  • Customizable virtual keyboards on iOS and Android.
  • High DPI support is dramatically improved over SDL2.
  • App metadata API for letting SDL report things about your app correctly (like in the About dialog on macOS, etc).
  • and much, much more.

Change History (21)

comment:1 by Xi Ruoyao, 21 months ago

See #19540.

comment:2 by Bruce Dubbs, 21 months ago

Milestone: 12.3 → 99-Waiting
Summary: SDL-3.2.0 → SDL-3.2.0 (Wait until someting needs this)

Looking at ​https://aur.archlinux.org/packages/sdl3-git, we do not have any packages that need this. Marking as Waiting. I will close #19540 in favor of this ticket.

comment:3 by Bruce Dubbs, 21 months ago

Summary: SDL-3.2.0 (Wait until someting needs this) → SDL-3.2.0 (Wait until someting needs this beyond SDL2)

comment:4 by zeckma, 16 months ago

An implementation of SDL3 and sdl2-compat installation instructions have been made:

We should still wait for more apps to use it. Currently, only Fluidsynth and some small projects not in BLFS depend on SDL3. In the case of FS, it prefers SDL3 over SDL2, but you can enable SDL2 over SDL3 in the options. It can use both. Only new projects coming out so far require SDL3, like decompilation projects.

Something else that should be noted is upstream is really pushing people to switch to SDL3+sdl2-compat. However, until things break, until SDL stops maintaining SDL2, I don't see much reason to switch over except for supporting those newer projects which is less of a BLFS issue.

Regardless, you all can take a look and try SDL3 out, at the very least sdl2-compat. Things seem good so far but there isn't a notable benefit so far from my testing.

Last edited 11 months ago by zeckma (previous) (diff)

comment:5 by zeckma, 14 months ago

While still nothing requires/recommends SDL3 in BLFS, we now have a package that can use SDL3: FreeRDP.

The likely case is it will eventually become a FluidSynth situation where it wants SDL3 but can fallback to SDL2 either automatically or with an option, but I can't predict if this will be the case and how far this will be out. Beyond that, nothing is on the radar that should make us consider switching to SDL3 besides upstream support for SDL2 itself instead of the compat version.

Outside of BLFS, there is faudio, FluidSynth of course, and some game related software like recompilation projects and emulators like freeciv and PCSX2.

Just like with Arch (​https://archlinux.org/packages/extra/x86_64/sdl3/), Gentoo also provides a useful list (​https://packages.gentoo.org/packages/media-libs/libsdl3/reverse-dependencies). We should check both from time to time.

comment:6 by Bruce Dubbs, 13 months ago

Summary: SDL-3.2.0 (Wait until someting needs this beyond SDL2) → SDL-3.2.0 (Wait until someting needs this beyond SDL-2)

comment:7 by zeckma, 13 months ago

Summary: SDL-3.2.0 (Wait until someting needs this beyond SDL-2) → SDL-3.2.0 (Wait until something needs this beyond SDL-2)

comment:8 by Joe Locash, 11 months ago

Summary: SDL-3.2.0 (Wait until something needs this beyond SDL-2) → SDL-3.2.26 (Wait until something needs this beyond SDL-2)

Why wait for packages to need this? SDL3 and sdl2-compat are both mature enough now. I did a build replacing SDL2 with SDL3 and added sdl2-compat as a replacement to SDL2. Worked fine. sdl12-compat also works fine with sdl2-compat so no issue there either. Seems better than waiting to see what package may require SDL3 but allows packages that support it to use it. Arch has gone this route.

comment:9 by Bruce Dubbs, 11 months ago

I'm OK with that, but we need to ensure that everything that needs sdl builds/runs. Right now we reference sdl2 17 times and sdl-compat 7 times.

comment:10 by zeckma, 11 months ago

Edited the SLFS links to SDL3+sdl2-compat as the previous links were broken.

comment:11 by zeckma, 11 months ago

I cannot confirm in sdl12-compat works as expected with sdl2-compat. However, I can verify that the following work:

  • FFmpeg
  • MLT
  • libwebp
  • gst-plugins-base
  • Pipewire
  • libqrencode
  • Qt6
  • Several packages outside BLFS

The above packages trickle down so the support is notable. FreeRDP should have its page changed to use SDL3, so if SDL3 works for that, testing for SDL2 shouldn't matter there. It also should list SDL2/3 as a dependency, whether optional or recommended. I don't know if an SDL backend is required for it.

The list so far:

y = yes (working)
n = no (not working)
? = unknown
total: 21; y: 7; n: 0; ?: 14
[?] postlfs/virtualization/qemu.xml
[y] x/lib/qt6.xml
[?] general/graphlib/libheif.xml
[?] general/graphlib/gegl.xml
[y] general/graphlib/libwebp.xml
[y] general/graphlib/libqrencode.xml
[?] multimedia/libdriv/v4l-utils.xml
[y] multimedia/libdriv/pipewire.xml
[?] multimedia/libdriv/libde265.xml
[?] multimedia/libdriv/sdl.xml
[y] multimedia/libdriv/gst10-plugins-base.xml
[y] multimedia/libdriv/mlt.xml
[?] multimedia/audioutils/audacious.xml
[?] multimedia/audioutils/mpg123.xml
[y] multimedia/videoutils/ffmpeg.xml
[?] multimedia/videoutils/mpv.xml
[?] multimedia/libdriv/libdv.xml (SDL1)
[?] multimedia/libdriv/xine-lib.xml (SDL1)
[?] multimedia/libdriv/gst10-plugins-bad.xml (SDL1)
[?] multimedia/libdriv/libmpeg2.xml (SDL1)
[?] multimedia/videoutils/vlc.xml (SDL1)
Last edited 11 months ago by zeckma (previous) (diff)

comment:12 by zeckma, 11 months ago

It's worth noting that all of the packages that list sdl12-compat list it as optional, or in VLC's case, for an Optional Video Plugin.

I'm unsure if it's worth it to test the sdl2-compat on top of sdl12-compat angle. I think we could even go as far as archiving sdl12-compat. But that's just what I get from grepping BLFS for sdl xrefs.

comment:13 by zeckma, 11 months ago

Owner: changed from blfs-book to zeckma
Status: new → assigned

comment:14 by Bruce Dubbs, 11 months ago

I think that if someone wants to update to sdl3 and sdl2-compat then we should go ahead.

For now just comment out the sdl2 and sdl12-compat pages in the book. Then create another ticket to list the packages that still need to be tested. We can then do those tests one at a time.

comment:15 by Joe Locash, 11 months ago

I haven't tested the running of these packages yet but from a build perspective these are my results from the packages I build:

[?] postlfs/virtualization/qemu.xml

Detects sdl2 and builds fine.

[?] general/graphlib/gegl.xml

Detects sdl2 and builds fine.

[?] multimedia/libdriv/v4l-utils.xml

Detects sdl2 and builds fine.

[?] multimedia/libdriv/libde265.xml

Detects sdl2 and builds fine.

[?] multimedia/libdriv/sdl.xml

Detects sdl2 and builds fine.

[?] multimedia/audioutils/audacious.xml

The plugins build detects SDL3 and builds fine.

[?] multimedia/audioutils/mpg123.xml

Detects sdl2 and builds fine.

[?] multimedia/videoutils/mpv.xml

Detects sdl2 and builds fine when -Dsdl2=enabled is passed to meson.

[?] multimedia/libdriv/libdv.xml (SDL1)

To use sdl --enable-sdl has to be passed to configure which the book doesn't mention. When enabled it detects sdl and builds fine.

[?] multimedia/libdriv/gst10-plugins-bad.xml (SDL1)

I dispute this dependency. The only mention of sdl in the source tarball is in the REQUIREMENTS file and some .po files.

comment:16 by zeckma, 11 months ago

Milestone: 99-Waiting → 12.5
Summary: SDL-3.2.26 (Wait until something needs this beyond SDL-2) → SDL-3.2.26 (Test for compatibility)

comment:17 by zeckma, 11 months ago

Started a branch @ zeckma-sdl3 and pushed commit 2a00c87b2e30c281328f3a41c9dd270dd9ceab40 to it. What will follow are minor changes and testing for various packages. This ticket is not complete yet.

comment:18 by zeckma, 11 months ago

Summary: SDL-3.2.26 (Test for compatibility) → SDL-3.2.26

comment:19 by zeckma, 11 months ago

I have tested every package that uses SDL2 and adjusted packages that use SDL3. I pushed my final changes and I believe it's ready. Will wait for objections/reviews before merging.

comment:20 by zeckma, 11 months ago

Resolution: → fixed
Status: assigned → closed

Merged into trunk.

comment:21 by Bruce Dubbs, 8 months ago

Milestone: 12.5 → 13.0

Milestone renamed

Note: See TracTickets for help on using tickets.