5 #include "android_native_app_glue.h"
7 static struct android_app *app;
9 static EGLSurface surf;
10 static EGLContext ctx;
12 void android_main(struct android_app *app_ptr)
17 app->onAppCmd = handle_command;
18 app->onInputEvent = handle_input;
22 struct android_poll_source *pollsrc;
24 while(ALooper_pollAll(0, 0, &num_events, (void**)&pollsrc) >= 0) {
26 pollsrc->process(ap, pollsrc);
30 if(app->destroyRequested) {
35 eglSwapBuffers(dpy, surf);