Go Bindings for SDL 2
Go C C++
Switch branches/tags
Nothing to show
Pull request Compare This branch is 1 commit behind DeedleFake:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
img clean-up, revert import paths Aug 17, 2013
test clean-up, revert import paths Aug 17, 2013
ttf merge ttf code from github.com/willemvds/sdl Aug 18, 2013
.gitignore Initial Commit. Jul 30, 2012
README.md Update README.md Aug 18, 2013
TODO Add README.md and TODO. Aug 2, 2012
audio.c Fix API breakage. Feb 25, 2013
audio.go Add SDL_audio.h. Aug 21, 2012
audio.h Add SDL_audio.h. Aug 21, 2012
blendmode.go Remove #cgo line from everything except sdl.go. Aug 3, 2012
clipboard.go Remove #cgo line from everything except sdl.go. Aug 3, 2012
cpuinfo.go Add SDL_cpuinfo.h. Aug 3, 2012
error.go Remove #cgo line from everything except sdl.go. Aug 3, 2012
events.c Add SDL_events.h. Aug 1, 2012
events.go go fmt Aug 17, 2013
events.h Add SDL_events.h. Aug 1, 2012
gesture.go Remove #cgo line from everything except sdl.go. Aug 3, 2012
hints.go SDL_hints.h Aug 18, 2013
keyboard.go Remove #cgo line from everything except sdl.go. Aug 3, 2012
keycode.c Add SDL_keycode.h. Aug 2, 2012
keycode.go Remove #cgo line from everything except sdl.go. Aug 3, 2012
keycode.h Add SDL_keycode.h. Aug 2, 2012
log.c Add SDL_log.h. Sep 2, 2012
log.go Add SDL_log.h. Sep 2, 2012
log.h Add SDL_log.h. Sep 2, 2012
mouse.c Add SDL_mouse.h. Aug 3, 2012
mouse.go Remove #cgo line from everything except sdl.go. Aug 3, 2012
mouse.h Add SDL_mouse.h. Aug 3, 2012
pixels.go Don't use pointer receiver for Color.RGBA(). Mar 13, 2013
rect.go Remove #cgo line from everything except sdl.go. Aug 3, 2012
render.go Remove #cgo line from everything except sdl.go. Aug 3, 2012
rwops.c fix build Aug 17, 2013
rwops.go fix build Aug 17, 2013
rwops.h fix build Aug 17, 2013
scancode.go Remove #cgo line from everything except sdl.go. Aug 3, 2012
sdl.go go fmt Aug 17, 2013
surface.c Fix stuff and move C functions into seperate files. Jul 31, 2012
surface.go Remove #cgo line from everything except sdl.go. Aug 3, 2012
surface.h Fix stuff and move C functions into seperate files. Jul 31, 2012
touch.go go fmt Aug 17, 2013
version.c Add SDL_version.h. Aug 2, 2012
version.go Remove #cgo line from everything except sdl.go. Aug 3, 2012
version.h Add SDL_version.h. Aug 2, 2012
video.go Fix API breakage. Feb 25, 2013

README.md

Go Bindings for SDL 2

This Go package provides bindings for SDL 2. For bindings for SDL 1 see banthar's GitHub repo.

While the package mostly follows the C API's naming conventions, some changes have been made. The 'SDL_' prefix of the C definitions has been removed. Thus, the C function

SDL_CreateWindow()

is

sdl.CreateWindow()

in this package.

In addition to this, some functions have been changed to be methods of related types where it seemed appropriate. Thus,

SDL_CreateRenderer()

is

(*Window).CreateRenderer()

in this package. Some of these methods' names differ from the originals as well. For example,

SDL_SetWindowFullscreen()

has been changed to

(*Window).SetFullscreen()

For a full API reference, see godoc.org.

Note: This is not yet finished. It is capable of loading and displaying images and handling events, but many things have not been implemented yet, nor has it been thoroughly tested. Expect bugs and missing features.

Prerequisites

Installation

  1. Set up your GOPATH.
  2. Run the following command:

go get github.com/DeedleFake/sdl