o
odin.langpkg.dev
packages / library / odin-lazyfoo-sdl3-tutorial

odin-lazyfoo-sdl3-tutorial

part002library

Lazy Foo's SDL3 tutorial in Odin

MIT · updated 1 year ago

Lazy Foo's SDL3 Tutorial in Odin

This simply follows Lazy Foo's SDL3 tutorial in the Odin programming language.

Note

There are a bunch of issues with the provided code in Lazy Foo's SDL3 tutorial, mainly that some code is still SDL2 based and uses functions that are not present in SDL3 any longer. Example: SDL3_image does not provide IMG_Init nor IMG_Quit any longer.

Build and Run

Prerequisites

You need to download a SDL3 release package and put the SDL3.dll into the out folder.

In addition you need the SDL3_Image package and copy the SDL3_image.dll to the out folder.

You also need to download the SDL3_ttf-devel-3.x.x-VC.zip development package. It contains the necessary SDL3_ttf.dll, SDL3_ttf.pdb and SDL3_ttf.lib files in the lib/x64 folder, which you need to copy to the vendor/sdl3_ttf folder before compiling.

# The `out` folder must exists before running this.
$ odin run src/ -out:out/tutorial.exe -strict-style -vet -debug

Copyright

Copyright © 2025 by Daniel Kurashige-Gollub

License

MIT