3dphotoshoot
diff src/android/amain.c @ 5:31cc6615428d
foo
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Thu, 21 May 2015 13:47:04 +0300 |
parents | 38377f54527a |
children | e31e23ead56f |
line diff
1.1 --- a/src/android/amain.c Tue May 19 06:05:51 2015 +0300 1.2 +++ b/src/android/amain.c Thu May 21 13:47:04 2015 +0300 1.3 @@ -1,5 +1,6 @@ 1.4 #include <stdio.h> 1.5 #include <stdlib.h> 1.6 +#include <assert.h> 1.7 #include <EGL/egl.h> 1.8 #include <jni.h> 1.9 #include "native_glue.h" 1.10 @@ -26,6 +27,8 @@ 1.11 static JNIEnv *jni; 1.12 static jclass activity_class; 1.13 1.14 +static unsigned int camtex; 1.15 + 1.16 static int call_foo() 1.17 { 1.18 jmethodID foo_id; 1.19 @@ -101,6 +104,14 @@ 1.20 if(init_gl() == -1) { 1.21 exit(1); 1.22 } 1.23 + 1.24 + // create the camera texture 1.25 + glGenTextures(1, &camtex); 1.26 + glBindTexture(GL_TEXTURE_EXTERNAL_OES, camtex); 1.27 + glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_MIN_FILTER, GL_NEAREST); 1.28 + glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_MAG_FILTER, GL_NEAREST); 1.29 + assert(glGetError() == GL_NO_ERROR); 1.30 + 1.31 /* initialize the application */ 1.32 if(game_init() == -1) { 1.33 exit(1); /* initialization failed, quit */ 1.34 @@ -284,11 +295,3 @@ 1.35 eglTerminate(dpy); 1.36 dpy = 0; 1.37 } 1.38 - 1.39 - 1.40 -/* 1.41 -static jclass get_java_class(const char *name) 1.42 -{ 1.43 - jobject native 1.44 -} 1.45 -*/