@@ -51,10 +51,8 @@ public static void log(String log) {
51
51
52
52
// private Texture customTexture;
53
53
private PGraphicsOpenGL pg ;
54
- private IntBuffer pixelBuffer ;
55
54
56
55
private PGraphicsOpenGL destpg ;
57
- PGL pgl ;
58
56
59
57
private CameraHandler mCameraHandler ;
60
58
@@ -75,8 +73,6 @@ public Capture(final PApplet applet, int width, int height) {
75
73
height = 1280 ;
76
74
}
77
75
init (width , height , ARGB );
78
- pixelBuffer = IntBuffer .allocate (width * height );
79
- pixelBuffer .position (0 );
80
76
81
77
applet .registerMethod ("pause" , this );
82
78
applet .registerMethod ("resume" , this );
@@ -166,9 +162,9 @@ public void surfaceDestroyed(SurfaceHolder holder) {
166
162
// TODO: Release Camera resources
167
163
}
168
164
169
- public String [] list () {
170
- if (applet .getPackageManager ().hasSystemFeature (
171
- PackageManager .FEATURE_CAMERA )) {
165
+ public static String [] list () {
166
+ // if (applet.getPackageManager().hasSystemFeature(
167
+ // PackageManager.FEATURE_CAMERA)) {
172
168
int nOfCameras = Camera .getNumberOfCameras ();
173
169
for (int i = 0 ; i < nOfCameras ; ++i ) {
174
170
Camera .CameraInfo cameraInfo = new Camera .CameraInfo ();
@@ -183,8 +179,8 @@ public String[] list() {
183
179
String [] array = new String [nOfCameras ];
184
180
camerasList .toArray (array );
185
181
return array ;
186
- }
187
- return null ;
182
+ // }
183
+ // return null;
188
184
}
189
185
190
186
private void startPreview (SurfaceHolder mHolder ) {
@@ -353,7 +349,7 @@ public void prepareFrameBuffers() {
353
349
GlUtil .checkGlError ("glFramebufferTexture2D" );
354
350
355
351
/*
356
- //No sure if this is required in opengl 2. Ignoring as of now.
352
+ //No sure if this is required in opengl es 2. Ignoring as of now.
357
353
IntBuffer drawBuffers = IntBuffer.allocate(1);
358
354
drawBuffers.put(0, GLES20.GL_COLOR_ATTACHMENT0);
359
355
GLES30.glDrawBuffers(1, drawBuffers);
0 commit comments