Skip to content

Commit 994e524

Browse files
committed
set current thread as glthread for custom PGraphicsOpenGL object
Signed-off-by: Umair Khan <[email protected]>
1 parent 9fc35af commit 994e524

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/in/omerjerk/processing/video/android/Capture.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,14 @@
88
import android.graphics.SurfaceTexture;
99
import android.hardware.Camera;
1010
import android.hardware.Camera.Size;
11-
import android.opengl.GLES11Ext;
1211
import android.opengl.GLES20;
13-
import android.opengl.GLES30;
1412
import android.opengl.GLSurfaceView;
1513
import android.os.Handler;
1614
import android.os.Message;
1715
import android.util.Log;
1816
import android.view.SurfaceHolder;
1917
import processing.core.PConstants;
2018
import processing.core.PApplet;
21-
import processing.core.PGraphics;
2219
import processing.core.PImage;
2320
import processing.opengl.PGL;
2421
import processing.opengl.PGraphicsOpenGL;
@@ -372,7 +369,8 @@ public void prepareFrameBuffers() {
372369
public void getImage(boolean loadPixels) {
373370

374371
if (destpg == null || destpg.width != width || destpg.height != height) {
375-
destpg = (PGraphicsOpenGL) parent.createGraphics(width, height, PConstants.P2D);
372+
destpg = (PGraphicsOpenGL) parent.createGraphics(width, height, PConstants.P2D);
373+
destpg.pgl.setGlThread(Thread.currentThread());
376374
}
377375

378376
destpg.beginDraw();

0 commit comments

Comments
 (0)