From 7b8dc09d57f4699ea837a6a94fb088fa8c5aa108 Mon Sep 17 00:00:00 2001 From: Themaister Date: Mon, 18 Nov 2013 09:32:29 +0100 Subject: [PATCH] Pass a dummy affine transform for android camera. --- camera/android.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/camera/android.c b/camera/android.c index 6052c49cd7..1863c41957 100644 --- a/camera/android.c +++ b/camera/android.c @@ -152,8 +152,17 @@ static bool android_camera_poll(void *data, retro_camera_frame_raw_framebuffer_t if (newFrame) { + // FIXME: Identity for now. Use proper texture matrix as returned by Android Camera. + static const float affine[] = { + 1.0f, 0.0f, 0.0f, + 0.0f, 1.0f, 0.0f, + 0.0f, 0.0f, 1.0f + }; + if (frame_gl_cb) - frame_gl_cb(androidcamera->tex, GL_TEXTURE_2D, NULL); + frame_gl_cb(androidcamera->tex, + GL_TEXTURE_2D, // TODO: This is likely GL_TEXTURE_EXTERNAL_OES. + affine); return true; } @@ -169,3 +178,4 @@ const camera_driver_t camera_android = { android_camera_poll, "android", }; +