Initial commit

This commit is contained in:
Milan Nikolic 2017-01-27 09:35:30 +01:00
commit d7ff68b487
196 changed files with 286314 additions and 0 deletions

View file

@ -0,0 +1,33 @@
// +build android
package raylib
/*
#include "raylib.h"
#include "android_native_app_glue.h"
extern void android_main(struct android_app *app);
*/
import "C"
import "unsafe"
var callbackHolder func(unsafe.Pointer)
// Initialize Window and OpenGL Graphics
func InitWindow(width int32, height int32, app unsafe.Pointer) {
cwidth := (C.int)(width)
cheight := (C.int)(height)
C.InitWindow(cwidth, cheight, app)
}
// Sets callback function
func SetCallbackFunc(callback func(unsafe.Pointer)) {
callbackHolder = callback
}
//export androidMain
func androidMain(app *C.struct_android_app) {
if callbackHolder != nil {
callbackHolder(unsafe.Pointer(app))
}
}