veandco / go-sdl2

SDL2 binding for Go
https://godoc.org/github.com/veandco/go-sdl2
BSD 3-Clause "New" or "Revised" License
2.23k stars 225 forks source link

Android example #367

Open gen2brain opened 6 years ago

gen2brain commented 6 years ago

New Android example is here https://github.com/veandco/go-sdl2-examples/tree/master/examples/android . Thanks to static libs now it is really simple to build apk.

User needs to import "C" to export "main" function, https://github.com/veandco/go-sdl2-examples/blob/master/examples/android/main.go#L182 , and is used then in Java https://github.com/veandco/go-sdl2-examples/blob/master/examples/android/android/src/main/java/com/example/android/MyGame.java#L16 . Perhaps that can be somehow solved, i.e. with some function like SetMain.

veeableful commented 6 years ago

Great work @gen2brain!