# HG changeset patch # User John Tsiombikas # Date 1432205224 -10800 # Node ID 31cc6615428de910c3ee95de1c52bf2b11aa2584 # Parent 38377f54527a29768df184bde04cc284a6b4d464 foo diff -r 38377f54527a -r 31cc6615428d src/android/amain.c --- a/src/android/amain.c Tue May 19 06:05:51 2015 +0300 +++ b/src/android/amain.c Thu May 21 13:47:04 2015 +0300 @@ -1,5 +1,6 @@ #include #include +#include #include #include #include "native_glue.h" @@ -26,6 +27,8 @@ static JNIEnv *jni; static jclass activity_class; +static unsigned int camtex; + static int call_foo() { jmethodID foo_id; @@ -101,6 +104,14 @@ if(init_gl() == -1) { exit(1); } + + // create the camera texture + glGenTextures(1, &camtex); + glBindTexture(GL_TEXTURE_EXTERNAL_OES, camtex); + glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + assert(glGetError() == GL_NO_ERROR); + /* initialize the application */ if(game_init() == -1) { exit(1); /* initialization failed, quit */ @@ -284,11 +295,3 @@ eglTerminate(dpy); dpy = 0; } - - -/* -static jclass get_java_class(const char *name) -{ - jobject native -} -*/