You can sign up to get a daily email of our articles, see the Mailing List page.
We do often include affiliate links to earn us some pennies. See more here.

SDL (Simple DirectMedia Layer) is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware used by a great many companies and SDL 2 is now pretty much finished.

This software is used by Valve with Steam and Source 2, Unity game engine, tons of games, emulators and much more to provide easy cross-platform support for features noted above. It's a rather important thing for Linux gaming.

With the release of version 2.28.0, there's plenty of bug fixes and these additional features added:

  • Added SDL_HasWindowSurface() and SDL_DestroyWindowSurface() to switch between the window surface and rendering APIs
  • Added a display event SDL_DISPLAYEVENT_MOVED which is sent when the primary monitor changes or displays change position relative to each other
  • Added the hint SDL_HINT_ENABLE_SCREEN_KEYBOARD to control whether the on-screen keyboard should be shown when text input is active

That's it for SDL 2 now though, as it's moving into maintenance mode since their focus has moved onto SDL 3. With the major new version in the works they're going to be making some huge changes like adding in a 3D GPU API, full support for high DPI displays and much more.

Article taken from GamingOnLinux.com.
21 Likes
About the author -
author picture
I am the owner of GamingOnLinux. After discovering Linux back in the days of Mandrake in 2003, I constantly came back to check on the progress of Linux until Ubuntu appeared on the scene and it helped me to really love it. You can reach me easily by emailing GamingOnLinux directly. Find me on Mastodon.
See more from me
9 comments

ShabbyX Jun 22, 2023
SDL is awesome, but it looks like it's planning to be not-so-simple anymore.

Like, we don't need yet snother 3d graphics API. Especially not now when the serious APIs (like Vulkan) are still struggling trying to figure out how to best do things. APIs like SDL's would end up based on those 3 APIs and naturally make the same mistakes.


Last edited by ShabbyX on 22 June 2023 at 8:28 pm UTC
hardpenguin Jun 22, 2023
Quoting: ShabbyXSDL is awesome, but it looks like it's planning to to be not-so-simple anymore.

Like, we don't need yet snother 3d graphics API. Especially not now when the serious APIs (like Vulkan) are still struggling trying to figure out how to best do things. APIs like SDL's would end up based on those 3 APIs and naturally make the same mistakes.
Why not?

<removed because I was talking about a subject I do not have the detailed knowledge of>


Last edited by hardpenguin on 22 June 2023 at 12:31 pm UTC
ShabbyX Jun 22, 2023
Quoting: hardpenguin
Quoting: ShabbyXSDL is awesome, but it looks like it's planning to to be not-so-simple anymore.

Like, we don't need yet snother 3d graphics API. Especially not now when the serious APIs (like Vulkan) are still struggling trying to figure out how to best do things. APIs like SDL's would end up based on those 3 APIs and naturally make the same mistakes.
Why not?

<removed because I was talking about a subject I do not have the detailed knowledge of>

I feel like I already said why not. A lot of ideas that shaped Vulkan turned out to be impractical (multipass render passes, fully static pipelines, decriptor pools, etc). A *lot* of it has fundamentally changed in recent years. Other APIs (d3d12 and metal) have solved some other problems but not half of what Vulkan has solved. A common API (which will necessarily be layered over the main APIs) will end up being a common denominator which means the worst of all worlds.

Also, SDL's strength is in making system integration easy. A real usable graphics API is soooo much work, it just takes away SDL's resources from what people need it for.
slembcke Jun 22, 2023
View PC info
  • Supporter Plus
SDL is an amazing foundational bit of technology! It's used by so many things, outside of the Linux world too! I participated a bit in the SDL3 discussions a few months ago, and it looks like a nice set of updates. :)

Quoting: ShabbyXAlso, SDL's strength is in making system integration easy. A real usable graphics API is soooo much work, it just takes away SDL's resources from what people need it for.

Nah, he got an Epic Megagrant specifically to work on that project. Dunno what he does nowadays, but in the past he made money through contracting on ports to fund his SDL work. Hard to say it's diverting his valuable attention when it's already funded. The API seems like it's been done for quite a while and seems like a nice simple subset of modern APIs. https://github.com/icculus/SDL/blob/gpu-api/include/SDL3/SDL_gpu.h

IMO, the most risky bit is that he's making his own shader cross-compiling tools. "custom language" always sounds like a terrifying idea since I've never done it, but he seems to be well underway already. (shrug)
https://github.com/libsdl-org/SDL_shader_tools/

I've written a simple Vulkan renderer, and it's "not that bad", but it's not simple either. I don't think I could have done it without a decade and a half of GL knowledge already. A main point of the SDL GPU API is to make something that's beginner friendly, or just friendly for writing simple stuff. I do *not* use Vulkan in my simple projects where I just want to hash out an idea...
Purple Library Guy Jun 22, 2023
Quoting: slembckeNah, he got an Epic Megagrant specifically to work on that project.
Well, if someone's paying the piper . . . dunno how far that will stretch, though; lest we forget, they're actually more like Epic Kilogrants.
F.Ultra Jun 22, 2023
View PC info
  • Supporter
I hope we get an early SDL2->3 shim library this time in before distros decide to make SDL2 obsolete.
hardpenguin Jun 22, 2023
Quoting: F.UltraI hope we get an early SDL2->3 shim library this time in before distros decide to make SDL2 obsolete.
We will. Which brings us to the question: Will SDL 1.2 to SDL 2.0 compatibility library be compatible with SDL 2.0 to SDL 3.0 compatibility library?!
F.Ultra Jun 22, 2023
View PC info
  • Supporter
Quoting: hardpenguin
Quoting: F.UltraI hope we get an early SDL2->3 shim library this time in before distros decide to make SDL2 obsolete.
We will. Which brings us to the question: Will SDL 1.2 to SDL 2.0 compatibility library be compatible with SDL 2.0 to SDL 3.0 compatibility library?!

It should be, I mean the 1.2 to 2.0 shim would use the 2.0 to 3.0 shim, so yes there would be overhead due to every single call being several calls underneath the hood but it should work out of the box so to speak.
Eike Jun 23, 2023
View PC info
  • Supporter Plus
By the way, I saw a libSDL3 in my Steam directories lately. What is that about? Are they using an early development version?
While you're here, please consider supporting GamingOnLinux on:

Reward Tiers: Patreon. Plain Donations: PayPal.

This ensures all of our main content remains totally free for everyone! Patreon supporters can also remove all adverts and sponsors! Supporting us helps bring good, fresh content. Without your continued support, we simply could not continue!

You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
Login / Register


Or login with...
Sign in with Steam Sign in with Google
Social logins require cookies to stay logged in.