# m2SDL showcases Ports of example programs from the vendored SDL archive (`SDL-main/`, ignored by git) to GNU Modula-2, running against SDL2. | Showcase | Ported from | Shows | |---|---|---| | `showcase_clear` | `examples/renderer/01-clear/clear.c` | renderer, per-frame clear color, `MathLib0.sin` fade | | `showcase_rectangles` | `examples/renderer/05-rectangles/rectangles.c` | draw/fill rects, rect arrays via `ADR`, integer scale math | | `showcase_primitives` | `examples/renderer/02-primitives/primitives.c` | fill rect, point cloud (`libc rand`), outline, X lines | | `showcase_snake` | `examples/demo/01-snake/snake.c` | full game: packed board, food, keyboard (`SDLKey`, `PollM2Event`) | All three are public-domain originals; adaptation notes (SDL3 to SDL2 API renames, float to integer rects, callback to main-loop shape) live in each file header. Build and run: ```sh make showcases ./build/showcases/showcase_clear # close window, or waits 8 s ./build/showcases/showcase_rectangles ./build/showcases/showcase_primitives ./build/showcases/showcase_snake # arrows steer, R restarts, Q quits SDL_VIDEODRIVER=dummy ./build/showcases/showcase_clear # headless ```