Deprecated
This repo is not actively maintained. The rust sdl2 project should have up to date example code.
Rust SDL2 Examples
Setup
You will need rust and SDL2 on your system.
Build the examples via Cargo
cargo build
Some examples will require assets so run each example from the root of the project.
cargo run --bin eg04
Eg01
Displays a window for a moment then quits.
Eg02
Handling events.
Eg03
Rendering shapes.
Eg04
Surface rendering.
Eg05
Texture rendering.