Skip to content
Go Bindings for SDL 2
Go C C++
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
img
test
ttf
.gitignore
LICENSE
README.md
TODO
audio.c
audio.go
audio.h
blendmode.go
clipboard.go
cpuinfo.go
error.go
events.c
events.go
events.h
gesture.go
hints.go
keyboard.go
keycode.c
keycode.go
keycode.h
log.c
log.go
log.h
mouse.c
mouse.go
mouse.h
pixels.go
rect.go
render.go
rwops.c
rwops.go
rwops.h
scancode.go
sdl.go
surface.c
surface.go
surface.h
touch.go
version.c
version.go
version.h
video.go

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

Something went wrong with that request. Please try again.