Android example can now be built on desktop

This commit is contained in:
Milan Nikolic 2017-02-02 03:09:17 +01:00
parent 56debbf236
commit e365f75e34
5 changed files with 43 additions and 15 deletions

View file

@ -10,12 +10,21 @@ import "C"
import "unsafe"
// Initialize Window and OpenGL Graphics
func InitWindow(width int32, height int32, title string) {
func InitWindow(width int32, height int32, t interface{}) {
cwidth := (C.int)(width)
cheight := (C.int)(height)
ctitle := C.CString(title)
defer C.free(unsafe.Pointer(ctitle))
C.InitWindow(cwidth, cheight, ctitle)
title, ok := t.(string)
if ok {
ctitle := C.CString(title)
defer C.free(unsafe.Pointer(ctitle))
C.InitWindow(cwidth, cheight, ctitle)
}
}
// Sets callback function
func SetCallbackFunc(func(unsafe.Pointer)) {
return
}
// Shows cursor