Skip to content

Commit 7d39c4b

Browse files
committed
fix inversion
Signed-off-by: Umair Khan <[email protected]>
1 parent 452e8c3 commit 7d39c4b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ public Capture(final PApplet applet, int width, int height) {
8080
glView = (GLSurfaceView) applet.getSurfaceView();
8181
pg = (PGraphicsOpenGL)applet.g;
8282
customTexture = new Texture(pg, width, height);
83+
customTexture.invertedY(true);
8384
log("cusotm texture address = " + customTexture.glName);
8485
pg.setCache(this, customTexture);
8586
applet.runOnUiThread(new Runnable() {
@@ -329,10 +330,11 @@ public void prepareFrameBuffers() {
329330

330331
GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, customTexture.glName);
331332
GlUtil.checkGlError("glBindTexture");
333+
/*
332334
GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MIN_FILTER, GLES20.GL_LINEAR);
333335
GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MAG_FILTER, GLES20.GL_LINEAR);
334336
GLES20.glTexParameterf(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_WRAP_S, GLES20.GL_CLAMP_TO_EDGE);
335-
GLES20.glTexParameterf(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_WRAP_T, GLES20.GL_CLAMP_TO_EDGE);
337+
GLES20.glTexParameterf(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_WRAP_T, GLES20.GL_CLAMP_TO_EDGE);*/
336338
GLES20.glTexImage2D(GLES20.GL_TEXTURE_2D, 0, GLES20.GL_RGBA, width, height, 0, GLES20.GL_RGBA, GLES20.GL_UNSIGNED_BYTE, null);
337339
GlUtil.checkGlError("glTexImage2D");
338340

0 commit comments

Comments
 (0)