msteele / mojo-sdl

Minimal SDL2 binding for Mojo🔥

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Minimal SDL binding for Mojo 🔥

Very basic native Mojo bindings to SDL2. No Python is used at runtime. A Python script to generate different colormaps for the demo is included.

Usage

Requires SDL installed:

Ubuntu

apt install libsdl2-dev

Fedora

dnf install sdl2-devel

Mac OS

brew install sdl2

Copy SDL.mojo to your project or try the Mandelbrot demo ported from Mojo examples

Demo

Run

mojo mandelbrot.mojo

and zoom in/out with the mouse wheel.

About

Minimal SDL2 binding for Mojo🔥

License:Apache License 2.0


Languages

Language:Mojo 98.1%Language:Python 1.9%