nuclear@0: package com.mutantstargoat.photoshoot3d; nuclear@0: nuclear@0: import android.app.NativeActivity; nuclear@0: import android.util.Log; nuclear@4: import static android.opengl.GLES20.*; nuclear@4: import android.hardware.Camera; nuclear@4: import android.hardware.Camera.CameraInfo; nuclear@4: import android.graphics.SurfaceTexture; nuclear@7: nuclear@3: /* nuclear@3: import android.os.Bundle; nuclear@3: import android.content.Context; nuclear@3: import android.hardware.camera2.*; nuclear@3: */ nuclear@0: nuclear@0: public class MainActivity extends NativeActivity { nuclear@6: public static String tag = "photoshoot3d"; nuclear@8: public static boolean frame_pending; nuclear@3: nuclear@4: public static void foo() nuclear@0: { nuclear@4: glClearColor(0.2f, 1.0f, 0.3f, 1.0f); nuclear@0: } nuclear@3: nuclear@3: // old camera api (fallback) nuclear@4: private static Camera cam; nuclear@7: private static SurfaceTexture surftex; nuclear@3: nuclear@4: public static int start_video(int texid) nuclear@4: { nuclear@4: int num_cams = Camera.getNumberOfCameras(); nuclear@4: Log.i(tag, "Found " + num_cams + " cameras"); nuclear@3: nuclear@8: if(num_cams < 1) { nuclear@8: return -1; nuclear@8: } nuclear@8: nuclear@4: for(int i=0; i