Lazy Foo' Productions

SDL Forums external link SDL Tutorials 🐰SDL3 Tutorials🥚 Articles OpenGL Tutorials OpenGL Forums external link
Follow BlueSky Follow Facebook Follow Twitter Follow Threads
Donate
News FAQs Contact Bugs

Hello SDL3

Hello SDL3 screenshot

Last Updated: Oct 13th, 2024

So you learned the basics of C++, but you're sick of making little text based programs. In order to use things like graphics, sound, keyboards, game controllers, etc you need an API (Application Programmer's Interface) that takes all those hardware features and turns it into something C++ can interact with.

That's what SDL does. It takes the Windows/Linux/Mac/Android/iOS/etc tools and wraps them in a way that you can code something in SDL and compile it to what ever platform it supports. In order to use it, you need to install it.
Unfortunately, there will not be a set up tutorial until after SDL3 has its first stable release. Currently, if you want to use SDL3, you'll have to build it from source. You can do that by going on the SDL github, downloading the source, and building it yourself. Building an SDL library (including SDL_image, SDL_mixer, etc) usually consists of checking the external directory (if one exists), running the script to download the external libraries and after you have all of your external libraries, open up the project of your preferred compiler (such as VisualC), and building the project in release mode. The reason I won't be creating a build from source tutorial is:

  1. Unless you really need something in the latest version, you generally want to use something more downstream than upstream because downstream is usually more stable.
  2. The latest version in source is more likely to have bugs than an official release.
  3. If you're a moderately experienced C++ programmer, it shouldn't be hard to figure out on your own. If you're not an experienced, you probably don't need to be running an experimental unreleased version of a library.
  4. Set up tutorials are a pain to make and I would like to avoid making another one.

In other words, please do not email me on how to build from source as it is beyond the scope of these tutorials.

Once you set up SDL, we'll cover your first SDL3 application.