From 23185bc7862d0f23901d743f3e332601978b16bd Mon Sep 17 00:00:00 2001 From: Sumbera Date: Fri, 26 Jun 2020 15:11:37 +0200 Subject: [PATCH] fix num_vertices in ArFrame_transformCoordinates2d call so it doesn't crash sample there are just 3 'vertices' - origin, x, y not 6. --- samples/hello_ar_c/app/src/main/cpp/hello_ar_application.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/hello_ar_c/app/src/main/cpp/hello_ar_application.cc b/samples/hello_ar_c/app/src/main/cpp/hello_ar_application.cc index 62281cfd7..d0a81c63c 100644 --- a/samples/hello_ar_c/app/src/main/cpp/hello_ar_application.cc +++ b/samples/hello_ar_c/app/src/main/cpp/hello_ar_application.cc @@ -438,7 +438,7 @@ glm::mat3 HelloArApplication::GetTextureTransformMatrix( // along the two principal axes. const float ndcBasis[6] = {0, 0, 1, 0, 0, 1}; ArFrame_transformCoordinates2d( - session, frame, AR_COORDINATES_2D_OPENGL_NORMALIZED_DEVICE_COORDINATES, 6, + session, frame, AR_COORDINATES_2D_OPENGL_NORMALIZED_DEVICE_COORDINATES, 3, ndcBasis, AR_COORDINATES_2D_TEXTURE_NORMALIZED, frameTransform); // Convert the transformed points into an affine transform and transpose it.