Skip to content
This repository

Go bindings for SDL

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
Piotr Praszmo authored
Octocat-spinner-32 doc Goinstall compatible. December 18, 2011
Octocat-spinner-32 gfx Goinstall compatible. December 18, 2011
Octocat-spinner-32 gui gofmt. December 20, 2011
Octocat-spinner-32 mixer Goinstall compatible. December 18, 2011
Octocat-spinner-32 sdl Create a structs_arm.go (duplicate of structs_386.go) so that Go-SDL can August 01, 2013
Octocat-spinner-32 test Goinstall compatible. December 18, 2011
Octocat-spinner-32 ttf ttf: add outline and hinting functions February 20, 2012
Octocat-spinner-32 .gitignore split constants and structures September 13, 2010
Octocat-spinner-32 Makefile gofmt. July 21, 2011
Octocat-spinner-32 README.md New README. December 20, 2011
Octocat-spinner-32 TODO Remove sdlgui.surfimg. sdl.Surface satisfies draw.Image. July 03, 2011
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.