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.
- sdl
- we: specifies the types and constants commonly used for window events.
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
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
This code is hereby released into the public domain.