Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Go bindings for SDL
Go C
branch: master

Merge pull request #61 from asimshankar/master

Create a structs_arm.go (duplicate of structs_386.go) so that Go-SDL can
latest commit a8c00afeef
@banthar authored

README.md

Go-SDL

Go-SDL provides bindings for the SDL, SDL_image, SDL_mixer, and SDL_ttf libraries.

Prerequisites

Installation

To install all of the relevant libraries, use the following:

goinstall github.com/banthar/Go-SDL/sdl
goinstall github.com/banthar/Go-SDL/ttf
goinstall github.com/banthar/Go-SDL/gfx
goinstall github.com/banthar/Go-SDL/mixer

If you don't have write permission for GOPATH/GOROOT, you may need to run the previous command as root. If you get errors while trying to run it using sudo, it's possible that the GOROOT/GOOS/GOARCH/GOBIN variables are not available to the make command. You can try using '-E' to preserve the environment:

sudo -E goinstall github.com/banthar/Go-SDL/sdl
sudo -E goinstall github.com/banthar/Go-SDL/ttf
sudo -E goinstall github.com/banthar/Go-SDL/gfx
sudo -E goinstall github.com/banthar/Go-SDL/mixer

It's also possible to install just using make:

make install

or

sudo -E make install

Usage

To import, use the following:

import "github.com/banthar/Go-SDL/sdl"

Replace the final 'sdl' with the library that you want to import.

Credits

  • banthar
  • Kevin MacLeod (mixer test music)
Something went wrong with that request. Please try again.