# SDL Tutorials

The best place to find simple SDL3 tutorials at the moment is [examples.libsdl.org](https://examples.libsdl.org/SDL3/), which offers small programs that each demonstrate one feature of the library. Most of the examples are 100-300 lines of C code. There are also simple-but-complete games and apps in the [demo section](https://examples.libsdl.org/SDL3/demo/), which are slightly larger (closer to 500 lines of C code), but more comprehensive.

The examples website runs each program directly in the web browser, and has a popup tab to show their source code, with all symbols linked to their wiki pages for easy research.

And, of course, all of the examples are included in SDL's source tree, in the [examples directory](https://github.com/libsdl-org/SDL/tree/main/examples), for you to tinker with and explore.

## Introduction

- [How to setup SDL3 as a git submodule with Modern CMake](https://www.youtube.com/watch?v=Mi47TQ4Tsr8)
- [Vulkan Dev Starter Pack with SDL3, CMake, C23 and more!](https://www.youtube.com/watch?v=WLjuV9_fQfw)
- [How to setup SDL 3, SDL_image, SQL and Flecs using Modern CMake on Windows](https://www.youtube.com/watch?v=T32B7nf6B-8)
- [HOWTO: Use Clion for Raylib | SDL2 | SDL3 Using CMake](https://www.youtube.com/watch?v=_i4wRjcp8eU)
- [Sol's Graphics Tutorial](http://iki.fi/sol/gp2/)
- [How to use SDL3 from Java](https://mccue.dev/pages/12-26-24-sdl3-java): Covers setting up a basic Java project with SDL3.
- [Vulkan HPP RAII + SDL3 Made Easy – A Live Guide for Beginners!](https://www.youtube.com/live/43sDPSSG0-U)
- [SDL 3 programming with the D programming Language by Mike Shah](https://www.youtube.com/playlist?list=PLvv0ScY6vfd-5hY-sFyttTjfuUxG5c7OA)
- [How to Make a 2D Game in C++ and SDL3 from Scratch](https://www.youtube.com/watch?v=Wu2g-N5Z78Y)

## SDL Camera

- [C Programming and SDL3 - accessing webcam, show webcam video, take screenshots](https://www.youtube.com/watch?v=nvDLBM0l7nA)

## SDL Audio

- [The SDL3 Audio Subsystem!](https://www.youtube.com/watch?v=MLau3hWJBeE): Quick overview of SDL3's audio model, no code.

## SDL GPU

- [Examples Repo](https://github.com/TheSpydog/SDL_gpu_examples)
- [SDL GPU Triangle Tutorial](https://hamdy-elzanqali.medium.com/let-there-be-triangles-sdl-gpu-edition-bd82cf2ef615)
- [SDL GPU API Concepts: Sprite Batcher](https://moonside.games/posts/sdl-gpu-sprite-batcher/)
- [SDL 3 GPU tutorial with C++23 and Modern CMake (Part 1)](https://www.youtube.com/watch?v=UFuWGECc8w0)
- [SDL 3 GPU tutorial with C++23 and Modern CMake (Part 2)](https://www.youtube.com/watch?v=HYb753diRYA)
- [SDL 3 GPU tutorial with C++23 and Modern CMake (Part 3)](https://www.youtube.com/watch?v=ddi7V0CDkLQ)
- [Odin SDL3 GPU Tutorial (Playlist)](https://www.youtube.com/playlist?list=PLI3kBEQ3yd-CbQfRchF70BPLF9G1HEzhy)
  This tutorial series is in the programming language Odin, not C or C++, but it can still be followed along with from other languages!
- [Setup SDL 3 GPU with CMake and vcpkg in C++ with SDL main callbacks (Playlist)](https://www.youtube.com/watch?v=90mzOdzdJsc&list=PLlKj-4rp1Gz1I1vxBQWAQkeTlvv7E8nIk)

## Porting from SDL 2.0

- [Porting ioquake3 from SDL2 to SDL3](https://youtu.be/i3yVqWYFbCE): Covers a basic port from SDL2.
- [Porting DirkSimple from SDL2 to SDL3](https://youtu.be/V_MWXDr3Nu4): Basic port, new audio subsystem features, SDL_EnumerateDirectory, main callbacks, emscripten port.
- [Porting Maelstrom from SDL2 to SDL3](https://youtu.be/TfkexYtd62w): Covers a complete port from SDL3

## Multi-Subject

- [Glusoft's SDL3 Tutorials](https://glusoft.com/sdl3-tutorials/): Covers setup of SDL3 and a variety of basic and advanced tutorials.
- [Mike Shah's SDL3 Tutorial Video Playlist](https://www.youtube.com/playlist?list=PLvv0ScY6vfd-RZSmGbLkZvkgec6lJ0BfX): Covers setup of SDL3 and programming tutorials demonstrating the SDL3 API.
- [DarkCybernetics](https://darkcybernetics.com ): creates comprehensive 2D/3D game tutorials using SDL2 and SDL3 also advanced Computer Science courses.

## باللغة العربية SDL3 شرح مكتبة

- [دروس برمجة الرسوميات باستخدام SDL3 باللغة العربية.](https://almhajer.github.io/GraphicsProgrammingAtlas)
- [SDL3 شرح مكتبة.](https://almhajer.github.io/GraphicsProgrammingAtlas/#sdl3-package/core)
- [SDL3_image مكتبة](https://almhajer.github.io/GraphicsProgrammingAtlas/#sdl3-package/image)
- [SDL3_audio مكتبة](https://almhajer.github.io/GraphicsProgrammingAtlas/#sdl3-package/audio)
- [SDL3_mixer مكتبة](https://almhajer.github.io/GraphicsProgrammingAtlas/#sdl3-package/mixer)
- [SDL3_ttf مكتبة](https://almhajer.github.io/GraphicsProgrammingAtlas/#sdl3-package/ttf)

If you come across good tutorials, please click [edit](https://wiki.libsdl.org/SDL3/Tutorials/edit) and add them!
