This project is a work in progress. The implementation is incomplete and subject to change. The documentation can be inaccurate.
Package win provides the core functionality required for window creation, drawing and event handling. The window events are defined in a dedicated package located at:
The library uses a small subset of the features provided by SDL version 2.0. Support for multiple windows has intentionally been left out to simplify the API.
Documentation provided by GoDoc.
Install the SDL library version 2.0 and run:
go get github.com/mewmew/sdl/win
Install the SDL_ttf library version 2.0 and run:
go get github.com/mewmew/sdl/font
Install the SDL_mixer library version 2.0 and run:
go get github.com/mewmew/sdl/audio
The simple
command demonstrates how to draw surfaces using the Draw and
DrawRect methods. It also gives an example of a basic event loop.
go get github.com/mewmew/sdl/examples/simple
The fonts
command demonstrates how to render text using TTF fonts.
go get github.com/mewmew/sdl/examples/fonts
The boxes
command demonstrates how to render text within the confines of a
fixed width box.
go get github.com/mewmew/sdl/examples/boxes
The play
command demonstrates how to open audio files and play sounds.
go get github.com/mewmew/sdl/examples/play
This code is hereby released into the public domain.