Skip to content

BrunoAssis/gosfml

 
 

Repository files navigation

gosfml

A rewrite of my favorite multimedia library, SFML, in Google's Golang

Installing Dependencies

Having installed go with proper path, you will additionally need some Open GL headers and the glfw3 go package. The required headers are glfw3 and glew. Make sure all the C libraries are dynamically linked, as CGO can't handle static libraries.

  • Mac
brew tap homebrew/versions
brew install glfw3
brew install glew
  • Windows

Detailed tutorial coming soon... You'll need to build and install glew and glfw using CMAKE. Make sure they're dynamically linked (with dlls)

  • Linux

Install opengl, glew, and glfw from whichever package manager your distribution comes with

Then you can install the Go bindings for OpenGL and gflw3 using go get:

go get github.com/go-gl/gl
go get github.com/go-gl/glfw3

There's some known issues building Go's glfw bindings though. Here's the workaround:

cd $GOPATH/src/github.com/go-gl/glfw3
CGO_CFLAGS=-ftrack-macro-expansion=0 go install

Note: mac users - you may need to use llvm-gcc instead of clang to build glfw, in shell, before running go get, type:

export CC=llvm-gcc

Installing gosfml

If all dependencies have been installed without error, you can simply use go get to grab gosfml:

go get github.com/tedsta/gosfml

Examples

Check out example usages from the examples folder!

About

A rewrite of my favorite multimedia library, SFML, in Google's Golang

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published