Skip to content

Commit 3df8ec6

Browse files
committed
render to our framebuffer
Signed-off-by: Umair Khan <[email protected]>
1 parent f2000ad commit 3df8ec6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ public static void log(String log) {
4848
private SurfaceTexture mSurfaceTexture;
4949
private FullFrameRect mFullScreen;
5050
private int mTextureId;
51+
private final float[] mSTMatrix = new float[16];
52+
5153
private Texture appletTexture;
5254

5355
private CameraHandler mCameraHandler;
@@ -264,6 +266,9 @@ public void onFrameAvailable(final SurfaceTexture surfaceTexture) {
264266
public void run() {
265267
System.out.println("onFrameAvailable");
266268
surfaceTexture.updateTexImage();
269+
GLES20.glBindFramebuffer(GLES20.GL_FRAMEBUFFER, frameBuffers.get(0));
270+
surfaceTexture.getTransformMatrix(mSTMatrix);
271+
mFullScreen.drawFrame(mTextureId, mSTMatrix);
267272
//TODO: Copy this texture to applet's texture
268273
}
269274
});

0 commit comments

Comments
 (0)